earlgreybot / Greybot

A wordpress theme and associated modifiations for earlgreybot.com
http://earlgreybot.com
GNU General Public License v2.0
0 stars 0 forks source link

nav bar does not show active page #15

Open earlgreybot opened 6 years ago

earlgreybot commented 6 years ago

Nav bar does show the active page on everything but the folio page because the current class is not applied to it as it is constructed differently.

earlgreybot commented 6 years ago

installed this plugin did not work

earlgreybot commented 6 years ago

tried this also not working

earlgreybot commented 6 years ago

tried this from the comment thread above

<?php //adds custom post type current menu https://gist.github.com/gerbenvandijk/5253921

function custom_active_item_classes($classes = array(), $menu_item = false){
global $post; $classes[] = ($menu_item->url == get_post_type_archive_link($post->post_type)) ? 'current-menu-item active' : ''; return $classes; } add_filter( 'nav_menu_css_class', 'custom_active_item_classes', 10, 2 );

?>

earlgreybot commented 6 years ago

did not work