WordPress.org

Support

Support » Themes and Templates » [Resolved] How to add tags in post and tag cloud at sidebar?

[Resolved] How to add tags in post and tag cloud at sidebar?

Viewing 4 replies - 1 through 4 (of 4 total)
  • 1. Maybe an example will be easier to follow. Look at the WordPress Default theme’s wp-content/themes/default/index.php file and see how it uses the_tags.

    2. If you can’t add the Tag Could widget to your sidebar, then might consider changing to a different theme. If that is not possible, then in your theme’s sidebar.php (or whatever Template controls your sidebar.php display) add the Template Tag, wp_tag_cloud().

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

    Thanks so much, Michael for your assistance. By not presenting an easy solution to my queries, you’ve ‘forced’ me to read and reread what is so foreign and mind-boggling to a non-technical person. Delighted that I took up the challenge and learnt so much, though almost crack up my poor brain to solve both the issues. Just in case, others who are technically challenged like me would like these 2 features in their blog, here’s the simple way already applied at my blog:

    To add post tags:
    1. Go to your site admin, select Editor > Single Post (single.php)
    2. Insert the following <p><?php the_tags(); ?></p> below the text <?php the_content() ;?> , bearing in mind that a template tag should be placed before this point <?php endwhile; ?> as indicated here: http://codex.wordpress.org/The_Loop_in_Action (this was the missing clue that solved the riddle for me!).

    To add a tag cloud
    1. As suggested by Michael, go to your theme’s sidebar.php (can be found at your site admin | Editor).
    2. Insert the following to where you want it to appear. I had it inserted before <h2>Meta</h2> , your sidebar features may differ:

    li (place it within the these symbols <> )
    <h2>Tags (or whatever title you want)</h2>
    <?php wp_tag_cloud( $args ); ?>
    /li
    (place it within these symbols <> )

    Hope this helps.

    Thanks again, Michael. Really appreciate your response.

    jayjayc,
    Thanks for your clarification. Question, how do I get to the Editor? I can’t find it on my dashboard, except for editing the theme, and I can’t find the single.php line there.

    you will have to open them in a code editor like dreamweaver/eclipse


    [signature moderated Please read the Forum Rules]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] How to add tags in post and tag cloud at sidebar?’ is closed to new replies.
Skip to toolbar