Show Post Tags In Your WordPress Blog Posts Easily

post tags in WordPress

WordPress users might be knowing about Post tags/ template tags or simply the tags that this blogging platform supports.

Many a times themes come up with default feature to show either individual post tags or “tag cloud” in the single post pages.

But some themes do not come with showing post tags on single post pages by default.In such cases, follow add these codes to your “single.php” file with in The Loop.

single posts php file

Case-1 : Default Use (Separated by Commas)

<p><?php the_tags(); ?></p>

Case-2 : Tags Separated by  Arrows

<?php the_tags('Social tagging: ',' > '); ?>

You can replace ‘>’ in the above code with a bullet ‘ • ’ to show tags separated by bullet

Case-3 : Tags as lists

<?php the_tags('<ul><li>','</li><li>','</li></ul>'); ?>

post tags example

If you are not using Noindex for tag archives, you must disable showing full post on tag archives to just showing excerpts only.`

WordPress Tip: View All Your Blog Posts With Titles & Post URLs

I wanted to have all of my blog posts with post URLs and titles at one place so that I can quickly quote or make reference to them whenever I post a new post at appropriate places.(In fact I wanted to have a XLS list of the same so that I can always check them directly from my computer .I’m not sure if there’s such a possibility in WordPress.)

However, there’s a little code (thanks to jdembowski), which will allow you view all of your Blog posts with Titles and URLs:

<?php

require_once('../wp-blog-header.php');
query_posts('&showposts=-1&order=ASC');

while (have_posts()) : the_post(); ?>

"<?php the_title(); ?>","<?php the_permalink(); ?>"
<br />

<?php endwhile; ?>

Open text editor, paste this code into that and save it as posts-urls.php,Now upload this file into “wp-content” folder i.e it should be like wp-content/posts-urls.php.

Now open this in your browser like www.yourdomain.com/wp-content/posts-urls.php and you can view all of your Blog posts in Ascending order of time (latest one at last) as a comma seperated list.However if you want it to be in descending order, just use ‘DSC’ instead of ‘ASC’ in the above code.

The output would be something like this:

viewing all blog posts with titles in WordPress

Please let me know if there is any another really good method to extract all Posts and titles form any WordPress blog.

Note: I know that  sitemap.xml file lists all post URLs (in fact all URLs associated with blog) but it doesn’t serve the purpose as it doesn’t show up post/page titles.

Also read Configure Google Friend Connect For WordPress Blogs.