Custom "tag" Page? Who has done one?

Community Forums Forums Design Tips and Tricks Custom "tag" Page? Who has done one?

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Gary Jones 2 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #64281


    I’m trying to customize a “tag” template to do what I would think should be easy to do via Genesis, as I know I have done the same type of thing via WordPress using a tag.php file.

    I am trying to do a sort ASC of Posts, with individual tags per page. So if my tag is “apples” the use can go to and see all Posts A-Z for just that tag. If they go to “oranges” then all Posts for oranges will be sorted A-Z, and so on.

    I have tried testing my theory by going to my archives.php page within my Child theme and adding some WordPress parameters of both
    <?php the_tags ?> and <?php get_tags ?> on the archives page, but I soon realized that adding either one of those without a sort doesn’t seem to display anything.

    Ideas for:

    1.) Get a list of Posts using the same Tag to be sorted ASC?

    bonus, but not as important
    2.) Display a list of tags: on the Archive/404 page similar to the Authors, Categories, etc


    Gary Jones

    1. Use a function hooked to pre_get_posts to amend the query to order alphabetically. Conditionally limit it to just a tag archive. The function MUST be in your functions.php and not in a tag.php or similar file.

    2. This would go into tag.php, just a case of customising the loop – you might want to see how 404.php does it as a starting point.

    Changes in Genesis 2.1 – the ultimate guide to every single change in Genesis Framework 2.1, 2.1.1 and 2.1.2 (all 90 of them!) | @GaryJ

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.