• Tim Derouin

    (@tderouindesign)


    I have a client that has changed their mind as to how the posts within the website need to be searchable.

    I need my tag.php file setup so that it can be generically used when viewing a tag page (ie http://www.domain.com/tag/tag-name). I want all posts using the specific tag to be displayed in alpha order.

    I have been able to setup a “tag-slug.php” document for a tag and that works other than the alpha order (see my page that works here: http://massflowergrowers.dreamhosters.com/web/tag/annuals/). However, we have over 100 tags and I really do not want to have to setup over 100 “tag-slug.php” documents.

    I am using this php code to force load a specific tag:

    $term_args=array(
      'include' => '7',
      'orderby' => 'name',
      'order' => 'ASC'
    );

    Is it possible to change the include property (currently set to 7 which is the ID for annuals: http://massflowergrowers.dreamhosters.com/web/tag/annuals/ ) to something that will force load only the tag associated with the page the user is on?

    Also, any thoughts as to why the posts are being listed from Z–A as opposed to A–Z?

    Thank you to anyone that can provide a little guidance here. I have read most of the forum posts regarding this type of issue but could not find any that specifically deal with my issue.

  • The topic ‘Only show posts with specific tag when viewing tag page’ is closed to new replies.