WordPress.org

Support

Support » How-To and Troubleshooting » Adding Tag Name to Page

Adding Tag Name to Page

Viewing 5 replies - 1 through 5 (of 5 total)
  • http://codex.wordpress.org/Function_Reference/get_the_tags

    Many themes provide a link in a post for such – that noted, one can create a Child Theme and a Page Template (for page of posts) or a post format type that will use a post format that can include above php anywhere..so:

    Use a theme that does already or customize the theme in use as noted…

    Hello,

    You can display the post tags anywhere in your template by using this WordPress function:

    <?php the_tags(); ?>

    Note that it has to be within the loop in order to work correctly. In addition, it will display all the tags, you’ve added for the post. Check out this link for more information on that matter:

    Something happened to the previous post, the link is http://codex.wordpress.org/Function_Reference/the_tags

    I can’t wait to try this. Thank you so much.

    One add’l question. If I wanted to surroudn a specific tag with static text how would I do that?

    For instance if the post was tagged “concrete, white, photos” and I wanted to display only the Concrete tag surrounded by static wording like this:

    Free High Resolution Concrete Textures

    What’s the best way to do this?

    Hi,

    You can simply display your tags within the text you want:

    <p>This is a normal HTML paragraph and my tags are: <?php the_tags(); ?></p>

    In addition, the function allows you to specify text to be shown before the tags, delimiters, etc.

    For example:
    <?php the_tags('Tagged with: ',' • ','<br />'); ?>
    will display:
    Tagged with: WordPress • Computers • Blogging

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding Tag Name to Page’ is closed to new replies.