Support » Themes and Templates » Putting posts in the sidebar

  • Resolved ragmag


    I have a 4 column theme. I’m trying to display posts of a particular category in one of my sidebars on the right side. I have searched this forum trying to find someone who asked this question previously. I found on the sort of addressed my problem and put this code in my sidebar:
    <?php query_posts(‘cat=5&showposts=3’); ?>
    <?php if (have_posts() : while (the_post()) : the_post(); ?>
    <?php the_title(); ?>
    <?php the_content(); ?>
    <?php endwhile; else : endif; ?>

    But nothing is showing up! Why?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m using the following for my sidebar. Maybe it will be of help.

    <?php $my_query = new WP_Query(‘category_name=wordpress-themes&showposts=20’); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <?php the_title(); ?>
    <?php the_content(); ?>
    <?php endwhile; ?>

    …or you could use Asides.

    Hey thanks for the help! I installed a plugin called Miniposts. I got it activated and its showing up under my widgets, but when I try to change the formatting under the Options tab, it goes to a missing page option: is not found.
    When I tried to upload the plugin under my admin folder in addition to having it installed in my wp-contents folder, I got an error message.
    Not sure what else to do, the plugin author said something about not having the IIRC plugin installed, but I can’t find that plugin anywhere. Any suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Putting posts in the sidebar’ is closed to new replies.