WordPress.org

Ready to get started?Download WordPress

Forums

show specific tags on category archive (2 posts)

  1. trink79
    Member
    Posted 5 years ago #

    I am working on a site where the posts have all been tagged with really long, and in my opinion unhelpful, tags causing the tag cloud to be so large it's pointless.

    The client wants all the tags and wants them cross-referenced. Example: if you click on "psychoanalytic thought" it will bring up posts tagged "psychoanalysis" and "psychoanalytic theory" as well. My thought was to create a category called "psychoanalysis" with all the relevant posts in it and use the category cloud widget instead of the tag cloud.

    My question is this. Is there a way to have something like:
    Currently viewing posts in the "psychoanalysis" category
    See also: psychoanalytic thought, psychoanalytic theory
    where the 'see also' options are tags not categories? I would prefer to not have to go back and re-categorize all the posts. If that is the best/only option I guess I will have to do it though.

    I have managed to get it to work by hardcording the "get_tag_link"

    <?php if (is_category('Psychoalanysis')) { ?>
    See also: <a href="<?php echo get_tag_link('108'); ?>">psychoanalytic</a>
    <?php } ?>

    but if the tag name changes I will have to go back in and edit the template. I am hoping for a solution where I can use get_tags(); or something to get the tags by ID and dynamically print the links.

    There is probably a really easy solution, but for some reason it is escaping me. Any suggestions would be greatly appreciated.

  2. trink79
    Member
    Posted 5 years ago #

    i forgot to mention the best part. most of the tags are only applied to 1 post!
    as appealing as having hundreds of categories with 1 post in them is, it just doesn't seem practical.

Topic Closed

This topic has been closed to new replies.

About this Topic