I need to tweak my wordpress code a little bit. What I have is that each post of my blog is assigned one or two categories. Now, I am looking to display all the previous posts on the particular category on any particualar page. For example, if I have a post on Adsense and have tagged it to category 'Google', then below this post, I need to display all my previous posts on the category 'Google'. Does anyone know how to put the code. Thanks
Thanks Izeaus. Suppose on my Wordpress blog, I write an article on Google and tag it under the category 'Google'. Now my code should be able to list down all the previous articles I have written that are tagged with the same category 'Google'. I tried the following code, but it doesn't seem to be working: <?php $recent = new WP_Query("tag=GOOGLE&showposts=6"); while($recent->have_posts()) : $recent->the_post();?> <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> </li> PHP:
Just PM the url and I would have a look . Well did you made the theme yourself or not . Otherwise the category code is like this <h3>By category:</h3> <ul> <?php wp_list_cats('sort_column=name&optioncount=1&feed=rss'); ?> </ul> Code (markup): This will show the category posts in Google Category.. The above code which you used will not work
Hi Izeaus I am using a free theme, but the code was provided by another wordpress user. I shall try your code and let you know if it works. Thanks a lot!
To clarify, I am looking for something like what appears below the blog post in this particular link: http://www.itfacts.biz/index.php?id=P9119 Thanks..
You could try the Other Posts from Cat plugin for WordPress from Dagon Design http://www.dagondesign.com/articles/other-posts-from-cat-plugin-for-wordpress/