Site logo

[Support request] How to disable sticky menu on selected types of posts?

Home Forums Support [Support request] How to disable sticky menu on selected types of posts?

Home Forums Support How to disable sticky menu on selected types of posts?

  • This topic has 1 reply, 2 voices, and was last updated 3 years ago by Fernando.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2570681
    Artur

    example

    post archive
    product archive

    #2570687
    Fernando
    Customer Support

    Hi Artur,

    You can try adding this snippet:

    add_filter( 'option_generate_menu_plus_settings','db_posts_disable_sticky_nav' );
    function db_posts_disable_sticky_nav( $options ) {
        if ( is_archive() || is_product_category() ) {
            $options['sticky_menu'] = 'false';
        }
        
        return $options;
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets

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