Help needed for Wordpress blog

Discussion in 'WordPress' started by XooX, Nov 9, 2007.

  1. #1
    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
     
    XooX, Nov 9, 2007 IP
  2. XooX

    XooX Well-Known Member

    Messages:
    661
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    155
    #2
    any ideas?
     
    XooX, Nov 10, 2007 IP
  3. izeaus

    izeaus Banned

    Messages:
    803
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    can you provide me some more details regarding this.. So that I may help
     
    izeaus, Nov 10, 2007 IP
  4. XooX

    XooX Well-Known Member

    Messages:
    661
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    155
    #4
    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:
     
    XooX, Nov 10, 2007 IP
  5. izeaus

    izeaus Banned

    Messages:
    803
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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
     
    izeaus, Nov 10, 2007 IP
  6. XooX

    XooX Well-Known Member

    Messages:
    661
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    155
    #6
    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!
     
    XooX, Nov 10, 2007 IP
  7. XooX

    XooX Well-Known Member

    Messages:
    661
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    155
    #7
    XooX, Nov 10, 2007 IP
  8. uglyboy

    uglyboy Peon

    Messages:
    1,963
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    0
    #8
    uglyboy, Nov 11, 2007 IP
  9. XooX

    XooX Well-Known Member

    Messages:
    661
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    155
    #9
    Wow UglyBoy

    You are a GodSend! Thanks a lot..I think this is exactly what I was looking for :D
     
    XooX, Nov 11, 2007 IP