• Can someone please tell me how to change it so that
    <?php wp_list_pages(''); ?>
    outputs the current pages li.class as only current_page_item and not current_page_item page_item,
    whilst still leaving all other pages with the li.class of page_item.

    Cheers Tom

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tom_de_schlong

    (@tom_de_schlong)

    Thread Starter tom_de_schlong

    (@tom_de_schlong)

    Its ok I have fixed it i simply changed the following code in “template-function-post.php” from
    $css_class = 'page_item';
    if( $page_id == $queried_obj->ID) {
    $css_class .= ' current_page_item';
    }

    to the following
    /* START OF EDIT */
    if( $page_id == $queried_obj->ID) { $css_class = 'current_page_item'; }
    else { $css_class = 'page_item'; }
    // This makes the current page have the 'only' the current_page_item class and all other pages the page_item class
    /* END OF EDIT */

    remember to backup before you edit the core files and as ever note down wqhat you changed and when, you will regret it otherwise.

    Cheers Tom

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘current_page_item’ is closed to new replies.