• Hi

    I have a WP site where I want to display posts on different pages (rather than only on one page) depending on the chosen category.

    Let’s say I have a Page1, Page2 and Page3, and I write a new post. Now, if I choose the category named ‘page1’, the post should appear on Page1 and not the pages.

    Is there an easy way to implement that, and does anybody know of a plugin which can do it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You don’t have to designate Pages for posts of a particular category. WordPress native archiving will do that.

    Don’t be confused by what an archive is–it is just a generated display of your posts at that moment. You don’t do anything to create the archive, that’s an automatic thing WordPress does for you. Usually, archives are date, category, tag, or author, based.

    Access to archives is typically presented via links in a sidebar under an Archive (date based), Category, or Tag Cloud, headings. Widgets, or Template Tags such as wp_get_archives(), wp_list_categories(), wp_tag_cloud(), and wp_list_authors(), are the constructs used to present links to users to visit your various archives. The process of placing code in your Theme’s Templates is explained in Stepping Into Templates and Stepping Into Template Tags.

    Once a user clicks on a Category link in the sidebar, the display of those posts can be controlled by a Category Template. Other Templates, such as Author Templates, and Tag Templates, are available if you set them up. These Templates can be coded via Template Tags such as the_title(), the_content(), or the_excerpt(), to display just a post title, the full content of the post, or just an excerpt of the post.

    Also, it is important to understand the Template Hierarchy, as that is how WordPress determines what Template to use to render the posts for reading by your readers.

    If a user visits a Category archive, then clicks on a given post title in that Category archive, the display of that single post is again presented by another Template, and again, the Template Hierarchy determines what Template displays that single post. Finally, that single post Template can be coded to display just the title, the full post content, or an excerpt.

    Thread Starter mpih

    (@mpih)

    Hi Michael

    I know I don’t _have_ to designate a page for each category, but in this case that is what I want to do.

    Let’s say I have a top menu which consists of various pages. One of the pages is ‘blog’ where I posts the site blog, and another page is for instance ‘news’ where I display site news.

    So when I create a new post, I need to identify which of the pages the post appears on. And it is this, I need some input on how to do 🙂

    One solution could be to simply display RSS output from a category/tag on each specific page, but this seems a little awkward, and there has to be a better solution to that… 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to display different posts on different pages?’ is closed to new replies.