[Resolved] Disable Primary Navigation on Tag Conditional

Home Forums Support [Resolved] Disable Primary Navigation on Tag Conditional

Home Forums Support Disable Primary Navigation on Tag Conditional

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #918642
    Thomas

    I have a plugin that allows pages to have tags and i want to disable the primary navigation menu with all pages tagged with the term “podcast”.

    add_filter( 'generate_navigation_location','tu_move_navigation' );
    function tu_move_navigation( $location )
    {
    	if ( has_term( 'podcast' ) ) {
    		return '';
            }
    	
    	return $location;
    }

    For some reason this is not working for me.

    #918660
    Leo
    Staff
    Customer Support

    Hi there,

    I believe the Layout Element should be able to do that:
    https://docs.generatepress.com/article/layout-element-overview/#disable-element

    Give it a shot and let me know 🙂

    #918677
    Thomas

    Generatepress is just too powerful… so much easier..

    #918680
    Leo
    Staff
    Customer Support

    Glad you are enjoying it!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.