Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8928071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:21:22+00:00 2026-06-15T08:21:22+00:00

I am new to wordpress , I need to know how to find the

  • 0

I am new to wordpress , I need to know how to find the category id instead of category name ?
in the wordpress .

Any one Much appreciated

Reg,
vicky

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:21:23+00:00Added an answer on June 15, 2026 at 8:21 am
    <?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;
    ?>
    

    Taken from the WordPress Codex: http://codex.wordpress.org/Function_Reference/get_cat_ID

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i am a new bee to wordpress i need to know that how
I'm working in new Wordpress plugin, but I need help with one regular expression.
I am converting a WordPress site to a django one. I need to preserve
i'm new with wordpress and php, but i need to get the recent posts
I am new to wordpress development and now I am stuck. I need to
I'm new to wordpress and have a quick question about showing a post's category
I installed new wordpress . and made some changes in twentyten theme.. only color
Recently installed new wordpress theme. The problem is, there are only following font options
I have installed a complete blank theme with no CSS in my new wordpress
New to wordpress and web design in general. I'm trying to setup a website

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.