Forums

How to exclude category with deprecated id? (9 posts)

  1. claytord
    Member
    Posted 1 year ago #

    I have been trying to run the loop without a category showing up within it, however get no response because the category_id or '&cat=-3' function is not working. Is there a way around this? It is probably something simple...

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    can you paste the full code of that template into a http://pastebin.com/ and post the link to it here?

  3. claytord
    Member
    Posted 1 year ago #

    Thanks Alchymyth, here is the code:

    [code moderated as per forum rules - please use the pastebin]

    I do not know how things have changed since the removal of cat ids or how to get around that.

  4. claytord
    Member
    Posted 1 year ago #

    Sorry, check this link I believe:

    http://pastebin.com/ysvU4zpP

  5. alchymyth
    The Sweeper
    Posted 1 year ago #

    try to add global $query_string; before your query:

    http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note

  6. claytord
    Member
    Posted 1 year ago #

    I guess my main issue is that I have no idea how to assign/change category ids now that they are no longer supported by wordpress. Without this or to get around it, I cannot exclude a category from my loop. Is there a way to add this functionality?

  7. claytord
    Member
    Posted 1 year ago #

    Here is the link that I think is causing my problem:
    http://codex.wordpress.org/Function_Reference/the_category_ID

  8. claytord
    Member
    Posted 1 year ago #

    I still am having trouble finding what number corresponds to what category that belongs in the '&cat=-3'. How do you know what a category's number is now that the category id's have been removed from the page?

    This seems simple, I am just not figuring it out.

  9. claytord
    Member
    Posted 11 months ago #

    Found this out and never followed up on it. When you are editing a category in the dashboard the ID shows up int he browser address bar right after a "category&tag_ID=". The following number is the category id.

Topic Closed

This topic has been closed to new replies.

About this Topic