Forums

When you click the tags in the tag clouds... (6 posts)

  1. stevenhandel
    Member
    Posted 2 years ago #

    At the moment, when you click a tag all it shows is the most recent article with that tag. See for yourself: http://www.theemotionmachine.com

    I know how to change it so that it shows 5 or 10 articles instead of just the one, but I want it to be a list of all the articles with that tag (along with possibly the excerpts) - not just a huge wall of text. Does this make sense? Is there a tag plug-in that can fix this for me?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    You don't need a plugin. Just the right template file.

    If your theme has a file called tag.php, edit it so that it resembles the index.php file. Otherwise, make a copy of your index.php file and rename it tag.php.

  3. stevenhandel
    Member
    Posted 2 years ago #

    Just did that and I don't notice a single difference. I made a duplicate of the index.php and named it tag.php. I see the new script in my WordPress editor. Are you sure thats all there is to it?

  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Yes - that's all you need to set up a tag template. Now you can edit tag.php to fit your needs. Perhaps something like:

    <p class="browsing">You are currently browsing all posts tagged with '<?php echo single_tag_title(); ?>'.</p>
    
    <?php wp_tag_cloud('format=list&unit=em&largest=2&smallest=1&number=0'); ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div <?php post_class();?> id="post-<?php the_ID();?>">
    <h2 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    
    <?php the_content(the_title('', '', false)." - continue reading&hellip;"); ?>
    
    <?php wp_link_pages('before=<div class="pagelist">Pages:&after=</div>&link_before=&link_after=&pagelink=%');?>
    
    <?php endwhile; ?><?php endif; ?>
  5. stevenhandel
    Member
    Posted 2 years ago #

    Sorry, I am not knowledgeable with code. I tried just adding the code to the tag.php but it doesn't do anything except make a mess.

    I really like the way the tags on your site work. I just want people to be able to click the tag and see a list (with summaries) of all the articles that have that tag.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    I don't know your individual template structure but I've dropped a copy of that particular tag page (which is actually a custom page template) into the Pastebin. You'll need to edit it for your sidebar call (compare it to your page.php file) but it should give you something to work with.

Topic Closed

This topic has been closed to new replies.

About this Topic