145 posts
  • Bought between 1 and 9 items
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 1 000 and 5 000 dollars
  • United Kingdom
JJenZz says

I am trying to exlcude a category from my wp_list_categories() list but thought that surely excluding by ID is risky if you plan to release the theme. What if the user creates the category and it ends up with a different ID?

So, I thought the solution would be to exclude by category name rather than ID (which would mean generating my own query AFAIK – please correct me if I am wrong!) but another solution could be to provide an .sql export with the theme.

How do you guys/gals solve this?

Cheers :)

1417 posts
  • Envato Staff
  • Has been a member for 5-6 years
  • Senior Reviewer
  • Sold between 10 000 and 50 000 dollars
  • Attended a Community Meetup
  • Contributed a Blog Post
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
+10 more
kailoon Reviewer says

This is my experience. I used to exclude using category name, but it end up having error when the user using different language. So, better to keep using ID and provide a guides to change the ID. Or, provide the custom menu for user to select what to be excluded.

There is also a bug in WordPress when you want to exclude category, the posts order maybe having problems sometimes. So far I received only 1 feedback from one of my user for “SuperFresh” ( my free theme ).

80 posts
  • Bought between 10 and 49 items
  • Denmark
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 100 and 1 000 dollars
mads says

This might be a stupid question, by why would you exclude a category from the category list?

145 posts
  • Bought between 1 and 9 items
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 1 000 and 5 000 dollars
  • United Kingdom
JJenZz says

Mads,

I have created a ‘portfolio’ category so that the user can add items to their portfolio using wordpress, however, I do not want this category to appear in the list of blog categories on the blog section of the site.

Kai Loon,

The point about people using different languages is a very good one and something I hadn’t thought about. Which of the two solutions that you’ve suggested do you normally use?

Thanks for your help :)

145 posts
  • Bought between 1 and 9 items
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 1 000 and 5 000 dollars
  • United Kingdom
JJenZz says

Also, another thing (now that you have mentioned translations) ... what if the theme requires certain custom fields?

I am selecting them by name at the moment but I’m hoping this isn’t so much of an issue because the name of the field doesn’t appear on the front-end of the template.

1417 posts
  • Envato Staff
  • Has been a member for 5-6 years
  • Senior Reviewer
  • Sold between 10 000 and 50 000 dollars
  • Attended a Community Meetup
  • Contributed a Blog Post
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
+10 more
kailoon Reviewer says
Mads,

I have created a ‘portfolio’ category so that the user can add items to their portfolio using wordpress, however, I do not want this category to appear in the list of blog categories on the blog section of the site.

Kai Loon,

The point about people using different languages is a very good one and something I hadn’t thought about. Which of the two solutions that you’ve suggested do you normally use?

Thanks for your help :)

I prefer to use a dropdown in custom menu which will pull out the category list from the user’s database. So, languages will not be a problem anymore :) and it is easy to use ( for the user ).

80 posts
  • Bought between 10 and 49 items
  • Denmark
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 100 and 1 000 dollars
mads says
Mads, I have created a ‘portfolio’ category so that the user can add items to their portfolio using wordpress, however, I do not want this category to appear in the list of blog categories on the blog section of the site.

Ah, that makes sense. Why didn’t I think of that before? :D

burningstonecold
burningstonecold Recent Posts
Threads Started
143 posts
  • Australia
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 1 and 100 dollars
  • Won a Competition
burningstonecold says

Sorry to dig up a fairly old thread, but thought it might be better than starting a new one.

What I’m hoping to achieve is similar as above, but i basically want to exclude a certain category from the entire site except a single page which will be a portfolio page (Which will also have it’s own RSS feed..)

Anyone know if this is possible? I’ve checked out the Advanced Category Exclude Plugin, but I’ve found it still shows the posts in the pagination (next_posts_link/previous_posts_link).

I’d appreciate the help :)

by
by
by
by
by
by