Forums

Show Latest Posts On Pages Sorted By Category / Tag (3 posts)

  1. ddaniell
    Member
    Posted 2 years ago #

    Hello!

    So I want to extend my template. I am using it rather as a Content Management System (CSM) and only blog about news. The content is mostly on static pages.

    Now let's say I have the following static pages:

    • Europe
    • Austria
    • Germany
    • Italy

    Now I want that the page Austria automatically shows posts categorized as "Austria" and maybe also shows posts tagged with the keyword "austria", "vienna" and other keywords.

    I would enter the Tags and Categories I want to show on certain pages in a new user defined field.

    Any clue how to solve this?

    Thanks in advance!

  2. annedorko
    Member
    Posted 2 years ago #

    You'll need to create custom templates to apply to each of those pages. Take advantage of query_posts to make each one pull the correct posts.

  3. MichaelH
    Volunteer
    Posted 2 years ago #

    The Pages of Posts example shows using a custom field on a page to determine the category of posts to display in that Page. Guess you could extend that to multiple categories or tags. Would probably use a one custom field for tags and one for categories and separate multiple tags or categories with commas then implode that field into the tags or categories to use via a category__in or tag__in argument with the query.

Topic Closed

This topic has been closed to new replies.

About this Topic