automatically apply to all posts within specific category?
-
I’d love to see an option added to this plugin to apply the custom subnav menu to each post within a specific category, not just each category page. It’s tedious to remember to change the menu option for each post–why not just give an option to apply to all posts within specific categories?
Previously, using Prose, I’d accomplished that with this bit of code–but when I reverted to Genesis itself, it breaks the menu layout. Perhaps it would be a starting point?
// Subnav dependent on category remove_action('genesis_after_header', 'genesis_do_subnav'); add_action('genesis_after_header', 'custom_do_subnav'); function custom_do_subnav() { echo '<div id="subnav"><div>'; if ( in_category('tech') && !is_front_page() && !is_home() ) { wp_nav_menu( array('menu' => 'Tech' )); } else { genesis_do_subnav(); } echo '</div></div>'; }
https://www.ads-software.com/extend/plugins/genesis-simple-menus/
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘automatically apply to all posts within specific category?’ is closed to new replies.