[resolved] Select which tags to show on every page ? (3 posts)

  1. EyalReches
    Posted 2 years ago #


    After adding tags to post / pages i find the only way to show them on my website is with the tags cloud widget which show all the tags.
    Is there a way to show different tags on different page ?

    Thanks for any help


  2. Michael
    Forum Moderator
    Posted 2 years ago #

    for instance, to show tags of individual posts, review http://codex.wordpress.org/Function_Reference/the_tags

  3. EyalReches
    Posted 2 years ago #

    Thanks alchymyth :)

    The way to add different Tags to pages is:

    1. edit the page.php

    insert this code

    [ Moderator note: please wrap code in backticks or use the code button. ]

    <?php the_tags(); ?>

    After the

    <?php the_content( __( 'continue reading »', 'templatesquare' ) ); ?>

    In my Theme page.php this section looks like this with the tags line in it.

    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <div class="entry-content">
    <?php the_content( __( 'continue reading »', 'templatesquare' ) ); ?>
    <?php the_tags(); ?>
    <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'templatesquare' ), 'after' => '</div>' ) ); ?>
    <?php edit_post_link( __( 'Edit', 'templatesquare' ), '<span class="edit-link">', '</span>' ); ?>
    </div><!-- .entry-content -->
    </div><!-- #post -->
    <?php comments_template( '', true ); ?>
    <?php endwhile; ?>
    </div><!-- end #content -->

    2. After that install plugin "Tag Pages" from this URL:

    3. To finish add tags to your pages in the new tags section added by the plugin, this method will show only the tags of the page (for every page in your website)

    Good Luck :)

Topic Closed

This topic has been closed to new replies.

About this Topic