Home › Forums › Support › Remove secondary nav using hooks This topic has 3 replies, 2 voices, and was last updated 6 years, 8 months ago by Tom. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts August 1, 2017 at 5:23 am #358020 Anthony Hi, I’d like to remove the secondary nav on all pages except posts but I don’t want to hide it using css rules, as explained in previous posts. I prefer to not output it at all. How can I do it using hooks? Thank you August 1, 2017 at 9:53 am #358141 TomLead Developer Lead Developer You should be able to do something like this: add_filter( 'option_generate_secondary_nav_settings','tu_dynamic_secondary_nav' ); function tu_dynamic_secondary_nav( $options ) { if ( ! is_singular( 'post' ) ) { $options[ 'secondary_nav_position_setting' ] = ''; } return $options; } Let me know ๐ August 1, 2017 at 12:57 pm #358229 Anthony Perfect it works. Thank you. Is there somewhere more information on all these options? I’ve found the hooks and filters documentation pages to be not exhaustive. August 2, 2017 at 12:33 am #358443 TomLead Developer Lead Developer This is actually a core WordPress filter which allows you to filter into any option – super useful. I’ll work on adding some docs for it ๐ Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In