• At the moment, when you click a tag all it shows is the most recent article with that tag. See for yourself: https://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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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.

    Thread Starter stevenhandel

    (@stevenhandel)

    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?

    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; ?>
    Thread Starter stevenhandel

    (@stevenhandel)

    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.

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘When you click the tags in the tag clouds…’ is closed to new replies.