WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. EyalReches
    Member
    Posted 10 months ago #

    Hi

    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

    Eyal

  2. alchymyth
    Forum Moderator
    Posted 10 months ago #

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

  3. EyalReches
    Member
    Posted 10 months 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:
    http://wordpress.org/plugins/tag-pages/

    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 :)

Reply

You must log in to post.

About this Topic