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 8537851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:59:52+00:00 2026-06-11T10:59:52+00:00

Normal search is working fine, but I need to search based on category in

  • 0

Normal search is working fine, but I need to search based on category in wordpress.
For eg..
say I have two category named as ‘Car’ and ‘Bus’, if I choose CAR category then search should display results form CAR category and if I have choose BUS category then search should display results from Bus category.

As of now am using this code

<?php wp_dropdown_categories('show_option_all='.__('All Categories',        'appthemes').'&hierarchical='.get_option('cp_cat_hierarchy').'&hide_empty='.get_option('cp_    cat_hide_empty').'&depth='.get_option('cp_search_depth').'&show_count='.get_option('cp_cat_    count').'&pad_counts='.get_option('cp_cat_count').'&orderby=name&title_li=&use_desc_for_tit    le=1&tab_index=2&name=scat&selected='.cp_get_search_catid().'&class=searchbar&taxonomy='.AP    P_TAX_CAT); ?>

This code am using in Classipress Theme

Thanks
Shobhit

  • 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-11T10:59:54+00:00Added an answer on June 11, 2026 at 10:59 am

    There are several ways to achive this you have to replace the standard WordPress search form in searchform.php with the code below .

    This will enable search based on categories .

    <form role="search" method="get" id="searchform" action="<?php bloginfo('siteurl'); ?>">
    <div>
    <label class="screen-reader-text" for="s">Search for:</label>
    <input type="text" value="" name="s" id="s" /> 
    in <?php wp_dropdown_categories( 'show_option_all=All Categories' ); ?> 
    <input type="submit" id="searchsubmit" value="Search" />
    </div>
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Normal search in the activescaffold list page is not working. I have ListLocations
i am using MvcSitemapProvider and is working fine, but its returning all results in
I was able to get jQuery autocomplete working in CoffeeScript just fine, but when
For normal (say Windows Forms) C# applications, to execute commands after a successful build
Generating normal columnar data in excel file is quite easy but does any one
The normal implementations of a work queue I have seen involve mutexes and condition
I am working on razor project where I need to display jquery modal popup.
I'm using Solr for search. I have documents that have an integer field popularity
I am running OS X Lion (started on Leopard, and have gone through two
I'm working on rewriting some aging web applications. There are two in particular that

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.