WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to find out the category Id? (5 posts)

  1. viky081
    Member
    Posted 1 year ago #

    <?php
         $category_id = get_cat_ID('Category Name');
         $q = 'cat=' . $category_id;
         query_posts($q);
         if (have_posts()) : while (have_posts()) : the_post();
    
         the_content();
    
         endwhile; endif;
    ?>

    I am using the above code to find the category id ,
    I need to know the possibilities to find the category id manually (By admin panel) like a page or post id .

  2. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    If you mouse over the post/page name in all posts/pages, the url with the id number shows up at the bottom of the screen.

  3. viky081
    Member
    Posted 1 year ago #

    Thanks for your quick reply .But i discuss as the category id not page id or post id (I mentioned like post /page) I need to know how to find the category id in the admin panel instead of name.

  4. vjpo
    Member
    Posted 1 year ago #

    FAQ
    Mouse over on category name in Dashboard > Posts > Categories as well...

  5. viky081
    Member
    Posted 1 year ago #

    Thanks for your suggestions
    @kmessinger and @vjpo

Topic Closed

This topic has been closed to new replies.

About this Topic