WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a tutorial that will show me how to create a custom tabbed content area for my sidebar? I want to have two tabs - one for a specific category each (news & events) This tutorial http://net.tutsplus.com/tutorials/javascript-ajax/create-a-tabbed-interface-using-jquery/ shows how to create the tabs but how do I add the code for WordPress to show the excerpts of posts with thumbnail images from the categories so it shows in the selected tab?

share|improve this question

Follow that tutorial and use below code for specific category recent post where tutorial used un order list content.

    <?php $recent = new WP_Query("cat=1&showposts=10"); while($recent->have_posts()) : $recent->the_post();?>
        <li><a href="<?php the_permalink() ?>" rel="bookmark">
        <?php the_title(); ?>
    <?php endwhile; ?>

Change cat id and number of post as per your choice.

share|improve this answer
Thanks pixelgrain. Will that show a thumbnail as well or do I have to do something else? – Kevin Rittershaus Nov 29 '11 at 11:43
to show post thumbnail you need to add post thumbnail snippet where you want to show. something like <?php echo get_the_post_thumbnail(); ?> and if you want to link that thumbnail to the post than use permalink like <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" ><?php echo get_the_post_thumbnail(); ?></a> – pixelngrain Nov 29 '11 at 13:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.