WordPress.org

Ready to get started?Download WordPress

Forums

Is it possible to create a Page that show the posts of a specific category? (5 posts)

  1. wanemagazine
    Member
    Posted 4 years ago #

    Hello

    I would like to know if its possible to create pages that show all the posts of a specific categorY,

    Example: I have three pages : Blog (main) business and lifestyle

    I post on two categories Business and Lifestyle. Each time I post a post I would like it to show on the blog but also on its page (Business page if its in the business category and Lifestyle Page if its lifestyle category).

    is it possible ? How can I do that?

    Thank you

  2. ryans149
    Member
    Posted 4 years ago #

    yes it is possible:

    [link removed]

  3. Mark / t31os
    Moderator
    Posted 4 years ago #

  4. renato_s
    Member
    Posted 4 years ago #

    The general direction is the following:
    1. Create a new page (say, "Business");
    2. Duplicate your page.php file and name it business.php;
    3. Make business.php a Page Template (http://codex.wordpress.org/Pages#Page_Templates)
    4. Before the Loop, use query_posts to limit results to the category you want (http://codex.wordpress.org/Template_Tags/query_posts)
    5. Assign this page template to your Business Page.

  5. S.K
    Member
    Posted 4 years ago #

    It is an irony that ryans149 has given an external link which has nothing to do with the query of OP.

    He didn't want to know how to "exclude categories from the home page" at all. he wanted to know how to replicate posts from particular categories to show up in dedicated pages for those categories in addition to appearing on the blog page.

    This has been answered by renato_s.

    I find ryans149's link irrelevant here.

    In fact I wanted to amplify the solution offered by renato_s if sought by the OP. But I find the thread old and not sought after any more.

    The above is for the record.

    S.K

Topic Closed

This topic has been closed to new replies.

About this Topic