Site logo

Archived topic

Main Menu and secondary menu not showing

7 replies · Started by Sven on June 21, 2022

Viewing posts 1–8 of 8

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?

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.

Hi Fernando,

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

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.

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? :)

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.

Oh, thanks! That was the solution. :)

Glad to hear that!

This archived topic is closed to new replies.