WordPress.org

Ready to get started?Download WordPress

Forums

catagories and posts of catagories (4 posts)

  1. ishtiaqaj
    Member
    Posted 3 years ago #

    hi i am average user of wordpress.. my porblem is that i want to show all catagories and post in it on single page. the format like that...

    catagory name 1...

    all post in it one by one

    catagory name 2...

    all post in it one by one

    and so on

    help me plz to solve this....

  2. alchymyth
    Forum Moderator
    Posted 3 years ago #

    create a page template:
    http://codex.wordpress.org/Pages#Page_Templates

    get all categories:
    http://codex.wordpress.org/Function_Reference/get_categories

    loop through them using a foreach loop;
    example in here:
    http://codex.wordpress.org/Function_Reference/get_categories#List_Categories_and_Descriptions

    within that loop, use get_posts() with a foreach loop, or wp_query() witha awordpress loop, to get the posts of each category:
    http://codex.wordpress.org/Template_Tags/get_posts
    http://codex.wordpress.org/Class_Reference/WP_Query
    http://codex.wordpress.org/The_Loop

    link to your site?

  3. ishtiaqaj
    Member
    Posted 3 years ago #

    brother i want to exclude some catagories and plz if you can give me the code...plz

  4. ishtiaqaj
    Member
    Posted 3 years ago #

    bump??????????

Topic Closed

This topic has been closed to new replies.

About this Topic