Forums

Displaying posts with a certain tag on a page (4 posts)

  1. rolanddeschain
    Member
    Posted 3 years ago #

    Before I start, I am aware of this question, though it's a bit of a rough solution.

    I'm adding flickr galleries as posts for every set of mine on flickr, and all I want to do is use an existing page (called photography) to have a quick introduction at the top, and then display the posts in full underneath, obviously paginated so it's not an endlessly large stream of photos.

    Is there an elegant way to do this, or do I have to do the rough hack in the link above?

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    Assuming photography is a Category then the native Template Hierarchy will automatically invoke a Category Template to display those posts. So you just need to create a Category Template that displays the category description (where you could store the 'quick intro' and then use a simple loop (see wp-content/themes/defautl/index.php for a loop example) to display your posts.

  3. rolanddeschain
    Member
    Posted 2 years ago #

    Well I still can't figure it out :( I see a couple of loops, but have no idea how to edit them so they display one category.

    Does anybody have something similar that I can look at?

  4. Mark / t31os
    Moderator
    Posted 2 years ago #

    Create a file called for example category-6.php ...

    You can copy your existing category.php as a template to work from...

    However category-6.php will only be used when viewing the category with an ID of 6...

    So if category 8, then category-8.php, and so on....

Topic Closed

This topic has been closed to new replies.

About this Topic