Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

Really dumb wordpress query

Status
Not open for further replies.

jwm

Joined
Apr 23, 2007
Posts
384
Reaction score
5
This is probably really simple but I can't find the answer anywhere so hoping someone can help.

I have set up a WP site and have a number of categories about 8 of these are brand names and about 8 are price categories (ie £0-£50, £50 to £100 etc).

I want to arrange the sidebar so I have a title 'Search by Price' which then has the price categories below it (no brand categories included). Then below that have a title 'Search by Brand' which has the brand name categories below it but not the price categories.

I thought this would be simple enough but in WP I only seem to have the option to display all categories or none! Driving me mad trying to split them up. Can anyone help?
 
PHP:
<?php wp_list_categories('orderby=name&include=3,5,9,16'); ?>

Change the 3,5,9,16 for your relevant category id's
 
Just create two categories 'Search by Price' & 'Search by Brand' . Then create the others as sub categories of the above two.

Drop the Categories widget into your sidebar and remember in options to tick Show hierarchy.
 
You'd be better of creating custom taxonomies rather than trying to do it with categories. It would give you far more control over the way you can display things.
 
You'd be better of creating custom taxonomies rather than trying to do it with categories. It would give you far more control over the way you can display things.

Thanks, could you explain what this means in a non techie way?
 
To be honest probably not as it means editing the functions.php file and doing custom query post strings!

This article by Justin Tadlock is an excellent introduction: http://justintadlock.com/archives/2009/05/06/custom-taxonomies-in-wordpress-28
 
Status
Not open for further replies.

Rule #1: Be Respectful

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

New Threads

Domain Forum Friends

Lastest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Siusaidh AcornBot:
    Siusaidh has left the room.
      Siusaidh AcornBot: Siusaidh has left the room.
      Top Bottom