Results 1 to 5 of 5

Thread: Limit homepage Search Bar to top level categories (hide 2nd level etc cats)

  1. #1
    Thread Starter
    lucasstarbuck's Avatar
    Join Date
    Oct 2010
    Posts
    86
    Thanks
    10
    Thanked 12 Times in 6 Posts

    Post Limit homepage Search Bar to top level categories (hide 2nd level etc cats)

    Hey guys,

    I just made this mod, and wanted to pass it along.

    For those wanting to manually manipulate the drop-down category selection in the Search bar:

    - I'm using a Child Theme
    - I have a custom header.php

    In header.php, I changed:
    Code:
    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_child_count').'&orderby='.get_option('cp_cat_orderby').'&title_li=&use_desc_for_title=1&tab_index=2&class=searchbar&taxonomy=ad_cat');
    To:
    Code:
    wp_dropdown_categories('show_option_all='.__('All Categories', 'appthemes').'&hierarchical=1&hide_empty='.get_option('cp_cat_hide_empty').'&depth=1&show_count='.get_option('cp_cat_child_count').'&orderby='.get_option('cp_cat_orderby').'&title_li=&use_desc_for_title=1&tab_index=2&class=searchbar&taxonomy=ad_cat');
    What's different? I forced hierarchical=1 and forced depth=1.

    Hope someone gets some use out of this!

    Cheers.
    Last edited by pepsi; December 27th, 2010 at 07:31 PM.

  2. The Following User Says Thank You to lucasstarbuck For This Useful Post:

    liewzy (June 11th, 2011)

  3. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,978
    Thanks
    170
    Thanked 3,407 Times in 3,278 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  4. #3
    Thread Starter
    lucasstarbuck's Avatar
    Join Date
    Oct 2010
    Posts
    86
    Thanks
    10
    Thanked 12 Times in 6 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #4
    Newbie liewzy's Avatar
    Join Date
    May 2011
    Posts
    4
    Thanks
    12
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #5
    epiazk's Avatar
    Join Date
    Aug 2010
    Posts
    41
    Thanks
    4
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [TUTORIAL] Hide 3rd level categories from index-directory
    By simonovski in forum ClassiPress General Discussion
    Replies: 34
    Last Post: September 23rd, 2012, 09:30 AM
  2. Sub Category level 2 showing on the homepage - Not showing all of Subcategory level 1
    By sparesplanet in forum ClassiPress General Discussion
    Replies: 9
    Last Post: February 1st, 2012, 03:26 AM
  3. How do I hide 3rd level categories?
    By anc_lux in forum Report ClassiPress Bugs
    Replies: 2
    Last Post: September 19th, 2010, 05:28 PM
  4. Is there any way of making a 3rd level category
    By shatoony26 in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: September 2nd, 2010, 10:29 AM