Forums

[resolved] How do I find the Category ID number? (7 posts)

  1. loozianajay
    Member
    Posted 2 years ago #

    I need to edit my home.php. I need to know category IDs in order to do. Where can I find them?

  2. ajita
    Member
    Posted 2 years ago #

    If your theme doesn't support IDs you can use a ID reveal plugin.

  3. ajita
    Member
    Posted 2 years ago #

  4. nanobyte1111
    Member
    Posted 1 year ago #

    Okay, i just set up a new category and need to find the category id number, i have pretty links or permalinks and cant seem to find the category id in the database structure, and help you can see what im talking about here at http://www.beatzforsale.com.

    Thanks

  5. Mark / t31os
    Moderator
    Posted 1 year ago #

    When you're in the admin, hover over the edit link(or the title) for any of your categories and look at the address in your statusbar (that's the bar along the bottom of your browser window if you're unsure about what it is), you should see the category ID on the end of the URL..

  6. Saildude
    Member
    Posted 1 year ago #

    Is this the information you are looking for? If so either mouse over the category or click on it and read it in the address line of your browser.

    category/9-95-beatz/

  7. soulsizzle
    Member
    Posted 1 year ago #

    It's not ideal to hard-code ID's into your PHP code. I always prefer to reference them by name using the get_cat_id() function in WordPress.

    For example:
    $category_id = get_cat_id('$19.95 Beats');

Topic Closed

This topic has been closed to new replies.

About this Topic