• I’m using a category named ALL (cat=18) for the sole purpose of creating an alternative viewing experience for my visitors. Each post is added to the ALL category, along with any other categories that are applicable. That way, I can have a “List View” link on my home page that, when clicked, allows the user to enjoy a condensed view of all the posts, displaying the title, date, and an excerpt for each. Note, the home page displays its posts in full.

    So, I’d like to exclude the ALL category from appearing the list of categories next to the post’s title, which is controlled by the “the_category” command. I’ve excluded ALL from the Category List in the Sidebar, which was easy, but I just cannot find anything the addresses how to do this in conjunction with the “the_category” command.

    Suggestions?

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • http://wordpress.org/support/topic/140469?replies=23

    here is your answer

    actually its not really your answer sorry, it might help tho, i will try to find a solution sorry for the annoyance

    Thread Starter karnesb

    (@karnesb)

    Vachi,

    I have to thank you, because I’d come across the post you referenced at least 3 times during my research on this topic, and thought I’d read it thoroughly. I was wrong. I must have been so focused on the fact that the majority of the posters were either arrogant, uninformed thinkers who said it couldn’t be done or were addressing a similar but different point of excluding the actual post in a certain category – not just the category “name.”

    However, in re-reading it, I saw Testept’s comment referencing this url:
    http://designintellection.com/2007/excluding-wordpress-categories-with-css/

    Now, this article addressed exactly what I needed! I LOVED the out-of-the box, thought process that David Yeiser (author of the article referenced above) explored in figuring out how to achieve the goal of making the category name invisible.

    Now, I also have to confess, that Testept was right on target when he/she said Yeiser’s CSS code doesn’t “…work in all versions of browsers,” as I couldn’t get it to work in IE6 or earlier, but it DOES work in IE7, FoxFire, and Nescape9. Not sure about the Mac, as I don’t own own, so I can’t test it. However, that’s better than where I was, so I’ll take it!

    Thanks again for bringing a fresh set of eyes and clear perspective to my Q. And, if, by chance, you ever happen to run across a fix that addresses a solutioin for earlier versions of IE I’d love your passing it along.

    Much appreciated,
    Barbara

    I may not be understanding what you want correctly, but It sounded like the same problem I was dealing with, just today.

    I was using 3 specific categories, as main categories, that I could link to, in the nav bar. But did not want those categories to be listred at the end of each post, just the rest of the categories the posts happened to be in.

    At first, I chose the same fix that you did, using the CSS to edit out the category I didn’t want listed.

    Then I found a much much much better way to do it. A million times easier too. So easy I can’t believe I didn’t see it to begin with. Lets say for the sake of example, that I was using the the Category ‘All’ which had an id of 20. This allowed me to link to a page (www.website.com/?cat=20)

    Then I have other categories, such as ‘News’, ‘Movies’, ‘Journal’, etc.. Each post would be in one of those other categories as well as ‘All’. So what I did, was make ‘News’ and ‘Movies’ and ‘Journal’ etc… child categories of ‘All’. Now, none of the posts are actually in ‘All’. But, since the category they are in is a child of ‘All’ then the link going to the category page for ‘All’ still works, because it will load anything within the category, including children categories.

    Like I said..don’t know if thats what you were trying to do, but it sounded like it to me, and this is how I fixed it.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Exclude Single Category Name from “the_category” Command’ is closed to new replies.