Ready to get started?Download WordPress


Adding Tag Name to Page (6 posts)

  1. photo37
    Posted 1 year ago #

    I would like to add the TAG name to each page on my site.

    For instance: this page's content all has the tag: CONCRETE


    How would I add the word CONCRETE at the top of the content?
    I'm sure it's simple...but I can't figure it out.

    Thanks for your help.

  2. Pioneer Valley Web Design
    Posted 1 year ago #


    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...

  3. Hristo SiteGround
    Posted 1 year ago #


    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:

  4. Hristo SiteGround
    Posted 1 year ago #

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

  5. photo37
    Posted 1 year ago #

    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?

  6. Hristo SiteGround
    Posted 1 year ago #


    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

Topic Closed

This topic has been closed to new replies.

About this Topic