[Resolved] Main Menu and secondary menu not showing

Home Forums Support [Resolved] Main Menu and secondary menu not showing

Home Forums Support Main Menu and secondary menu not showing

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2259777
    Sven

    Hey,

    I just recognized that the main menu and secondary menu is not showing up anymore. Neither desktop nor mobile. I tried disabling it, created a new menu, disabled all plugins and started activating each single one again. But even with a blank structure of just GeneratePress and WordPress the menus wont come back.

    The website is: https://www.kabinencheck.com

    Can anyone help, please?

    #2259797
    Fernando
    Customer Support

    Hi Sven,

    I tried the credentials provided, however, it isn’t working.

    In any case, to clarify, can you check in Appearance > Customize > Menus, if you’ve set a Primary Menu and a Secondary Menu?

    Example: https://share.getcloudapp.com/6quzx4e8

    Kindly let us know.

    #2259799
    Sven

    Hi Fernando,

    yes I have set those as Primary and Secondary Menu. I provided new credentials.

    #2259811
    Fernando
    Customer Support

    Thank you for providing access to your site.

    As a first course of debugging, can you try #1 here?: https://docs.generatepress.com/article/debugging-tips/

    Also do the same for your custom functions in your Child theme’s functions.php.

    It would be ideal to take a backup of your site first before proceeding with this.

    Kindly let us know how it goes.

    #2259822
    Sven

    I now figured out that it is because of an add_action on pre_get_posts I have in my functions.php
    Why does this effect the menu? 🙂

    #2260024
    David
    Staff
    Customer Support

    Hi there,

    see the stack overflow reply here:

    https://wordpress.stackexchange.com/a/302370

    Note the: $query->is_post_type_archive() method for testing the condition. This will limit the pre_get_posts to just that query.

    #2260045
    Sven

    Oh, thanks! That was the solution. 🙂

    #2260057
    David
    Staff
    Customer Support

    Glad to hear that!

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