I’m currently using this code to display a menu of pages. I’m using CSS to target the class current_page_item
which works fine until you’re on a page with a custom post type.
How can I target that class when the page the user is on is a custom post-type such as news or events?
<div id="menu-repeat">
<?php $args = array(
'depth' => 1,
'show_date' => '',
'date_format' => get_option('date_format'),
'child_of' => 0,
'exclude' => '1908, 6282, 6380',
'include' => '',
'title_li' => __(''),
'echo' => 1,
'authors' => '',
'sort_column' => 'menu_order, post_title',
'link_before' => '',
'link_after' => '',
'walker' => '' ); ?>
<ul><div class="menu-button"><?php wp_list_pages( $args, 'sort_column=menu_order' ); ?></div></ul>