Wednesday, June 6, 2012

Active menu tab on based page id in wordpress

wp-includes/post-template.php

if($_REQUEST["cat"]!="" and $page->ID=="143") {
//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