Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8821513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:52:27+00:00 2026-06-14T05:52:27+00:00

my url looks like this: http://domain.com/?s=searchquery&post_type=qa_faqs that page lists search results for searchquery. i

  • 0

my url looks like this:
http://domain.com/?s=searchquery&post_type=qa_faqs

that page lists search results for “searchquery”.

i then get the post type with

$post_type = $_GET['post_type'];

it echoes correctly

echo $post_type;
// Provides: qa_faqs

i then do an if/else to display a different menu via wp_nav_menu when $post_type is qa_faqs.

if ( $post_type == 'qa_faqs' ) {
  echo 'we got qa_faqs over here';
  wp_nav_menu(array('menu' => 'meta_menu', 'items_wrap' => '<dl id="%1$s" class="nice tabs vertical %2$s">%3$s</dl>', 'walker' => new sidenav_walker ));
} else {
  echo 'no qa_faqs in da house';
  wp_nav_menu(array('menu' => 'service_menu', 'items_wrap' => '<dl id="%1$s" class="nice tabs vertical %2$s">%3$s</dl>', 'walker' => new sidenav_walker ));
}

now to the funny part:

even though the page echoes ‘we got qa_faqs over here’, it displays the service_menu.

why´s that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:52:28+00:00Added an answer on June 14, 2026 at 5:52 am

    Found it – http://codex.wordpress.org/Navigation_Menus

    Same problem was driving me nuts aswell.

    Use ‘theme_location’ instead of ‘menu’ to point to which menu you want to output.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a URL that looks like this http://domain.com/index.php/view/test . How do i rewrite
I'm trying to copy a url that looks like this: http://domain.com/myfile.php?test-main So I'm trying
If I have a URL that looks like this: $url = 'http://domain.com/?foo=bar'; And then
I have a url that looks like that http://example.com/index.php?id=111&title=word1 word2 word3 I need to
My URL currently looks like that http://www.mydomain.com/index.php?videoID=6nR9nsKTx4g but I want to access the page
Let's say my current URL page is http://domain.com/listing.php?term=updated&page=7&more=new-user In this page have a link
I have a CSS entry that looks like this: .header { background-image: url(./images/embouchure.jpg); background-repeat:
I have a simple form that looks like this: <%= simple_form_for @study,:url => studies_path,
I have a method in a url rewriting module that looks like this public
I have a string that looks like string url = "www.example.com/aaa/bbb.jpg"; "www.example.com/" is 18

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.