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 6093893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:36:50+00:00 2026-05-23T12:36:50+00:00

We would like to know the WordPress more about WordPress Category print and then

  • 0

We would like to know the WordPress more about WordPress Category print and then print Post in selected category.

Like in this style

<h2>Categories Name 1</h2>
<ul>
<li>Post1</li>
<li>Post2</li>
<li>Post3</li>
<li>Post4</li>
</ul>
<h2>Category Name 2</h2>
<ul>
<li>Post1</li>
<li>Post2</li>
<li>Post3</li>
<li>Post4</li>
</ul>
  • 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-05-23T12:36:51+00:00Added an answer on May 23, 2026 at 12:36 pm

    WordPress provides a function to return all categories (get_categories()) and a function to list all posts of a category (WP Query object).

    With the combination of the two, you can create the output you would like to do. The following is some example code that can be extended / changed with the parameters you need:

    $categories = get_categories();
    foreach($categories as $category)
    {
      printf('<h2>%s</h2><ul>', $category->cat_name);
      $posts = new WP_Query('cat='.$category->cat_ID);
      while($posts->have_posts())
      {
        $posts->the_post();
        echo '<li>', the_title(), '</li>';
      }
      print '</ul>';     
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know where I can go and learn more about client
I would like to know the best method for layering posts in wordpress 3.0
As far as I know this isn't possible. I would like to draw an
I'm currently using Wordpress.com to host my blog, but I would like more control
we would like to know, How to create Vertical Navigation Menu in Wordpress. I
I would like to know if there are any security vulnerabilities in this code:
I would like to know if I can open 2 different diagrams using MS
I would like to know which dependency described in my pom.xml brings a transitive
I would like to know what semaphores, messageQueues, etc... are active in my vxWorks
I would like to know what kind of tool you use for writing your

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.