How to show posts archive for different tags?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to show posts archive for different tags?

    Is there any way to show all posts related to tag in wordpress?
    So when the user goes to the tag archive it should show all the posts that have the respective tags.

    #2
    Re: How to show posts archive for different tags?

    Inorder to get the blog posts listed under the tags, you'd need to make minor modifications to the theme's functions.php

    You can enable the tags and categories for wordpress pages by adding the below code to functions.php:

    Code:
    function my_taxonomies() 
    {
        register_taxonomy_for_object_type('category', 'page');
        register_taxonomy_for_object_type('post_tag', 'page');
    }
    add_action('init', 'my_taxonomies');
    | |
    Best Paying offered by Eukhost Ltd.

    Comment


      #3
      Re: How to show posts archive for different tags?

      What I'm looking is not the taxonomy but the posts should show in the tag archive.

      For instance, if someone clicks on the tag 'Latest' then all the posts that have the tag 'Latest' should show up on that page.

      Comment


        #4
        Re: How to show posts archive for different tags?

        Originally posted by cliffJ View Post
        What I'm looking is not the taxonomy but the posts should show in the tag archive.

        For instance, if someone clicks on the tag 'Latest' then all the posts that have the tag 'Latest' should show up on that page.
        Hi,

        If I understood your request correctly, if you do not need a custom page template... you can use conditional query.
        But, if you DO want a tag.php , you need to create the template and add this :

        query_posts('tag=Latest+mp3+songs')
        ;

        and then , what you want to show, like title, writings, divs, styling, excerpt, images etc ...
        basically, just take the archive.php, duplicate it and change the query.

        By default your archive.php will show the posts corresponding to a particular tag, if the name of the tag is clicked on the tag cloud or a list of tags.

        If you want to have a sperate page showing posts from a particular tag or set of tags, make a page template and add the "query_posts" snippet ahead of the loop, and associate this template to the special page that you create.

        Comment

        Working...
        X