WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Putting posts in the sidebar (4 posts)

  1. ragmag
    Member
    Posted 6 years ago #

    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?

  2. genkisan
    Member
    Posted 6 years ago #

    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; ?>

  3. Doodlebee
    Member
    Posted 6 years ago #

    ...or you could use Asides.

  4. ragmag
    Member
    Posted 6 years ago #

    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: mysite.com/wp-admin/miniposts2.php 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?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags