Site logo

Archived topic

Can't hide nav menu with option_generate_blog_settings filter

5 replies · Started by Jim on October 1, 2020

Viewing posts 1–6 of 6

Kind of carrying over this question from the wordpress plugin support site, now that I've purchased GP Premium.

I'm trying to not have the primary nav menu on single posts of a custom post type (ncpage). I activated the Blog module, and understand that should activate the filter I'm trying to use. Here's what I have in functions php and is not working:

add_filter( 'option_generate_blog_settings', 'fp_no_nav' );
function fp_no_nav( $options ) {
    if ( is_singular( 'ncpage' ) ) {
		$options[‘single_post_navigation’] = false;
    }
    return $options;
}

Any thoughts?

Thanks. Finally got it to work. Being new to GP Premium, it would be helpful if, in those articles, it would say which modules need to be activated to use it. In this case, it seems to be both Elements and Disable Elements. Presumably those modules need to be kept activated for it to continue to work?

OK, I was confused I'm sure. Maybe I activated Disable Elements for a different reason. Thanks for your help.

No problem :)

This archived topic is closed to new replies.