Thursday, May 24, 2012

Show tab highlighted of page or category in wordpress

post-template.php in wp-includes


$css_class = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) );
if(($_REQUEST["cat"]!="" and $page->ID=="142") or ($_REQUEST["p"]!="" and $page->ID=="142")) {
//echo $page->ID;
$css_class1 = 'class="current_page_item"'; $css_class1 = 'current';
}
        $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_permalink($page->ID) . '" class="' . $css_class1 . '">' . $link_before . apply_filters( 'the_title', $page->post_title, $page->ID ) . $link_after . '</a>';

No comments:

Post a Comment

Thank you for your Comment....

Popular Posts