Adding Tag Name to Page
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.
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…
You can display the post tags anywhere in your template by using this WordPress function:
<?php the_tags(); ?>
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?
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.
<?php the_tags('Tagged with: ',' • ','<br />'); ?>
Tagged with: WordPress • Computers • Blogging
- The topic ‘Adding Tag Name to Page’ is closed to new replies.