WordPress.org

Ready to get started?Download WordPress

Forums

empty nav menu when query string contains certain parameters (1 post)

  1. ARZCDR
    Member
    Posted 10 months ago #

    Hello,

    I'm having this strange glitch with a nav menu obtianed through wp_nav_menu().

    The function returns the menu correctly in every situation except for when the query string in an ARCHIVE request includes the 'cat' parameter. For example:

    I have a custom post type 'Stories' for which the archive is just myhomeurl.com/story. For this page, wp_nav_menu() will return the menu correctly and as such will display as it should.

    But if I want to see just the stories with a certain category (i.e. myhomeurl.com/story/?cat=5), then wp_nav_menu() will not return anything. It's not a display issue, it is just that wp_nav_menu() will not return any markup.

    I have no idea what could be causing this, all I have been able to figure out is those conditions: in an archive with the category parameter set in the query string.

    Just in case it is relevant, I am using a customized child theme of the 'Responsive' theme.

    Unfortunately this is a local build so I can't really link to the site itself, I hope that is not an issue.

    Thank you in advance for any help.

Reply

You must log in to post.

About this Topic