Support » Plugins » Get posts in a category in floated div

  • I’m using WP as a light CMS and have static front page with slug “home”. I want the 3 most recent excerpts from posts in the “news” category to be displayed on the front page with links to the full posts on the “blog” Page. I’m using conditionals in my sidebar to call what I want on the other Pages of the site. Could you please take a look and see what I’m not doing right since nothing at all is showing in the Home’s sidebar? I was hoping the posts would at least show up and then I could figure out how to dispaly just excerpts, but nothing’s showing (but they are showing on the “blog” Page). The other Pages’ sidebars work, but then again they all have just html.

    sidebar.php code:

    <div id=”sidebar”>
    <?php if(is_page(home)) : ?>

    //as $wp_query is reinitialised, let’s run the_loop
    if (have_posts()) :
    while (have_posts()) : the_post();

    <?php endif; ?>

    <?php if(is_page(about)) : ?>

    image and paragraph go here

    <?php endif; ?>

    <?php if(is_page(work)) : ?>

    paragraphs and links go here

    <?php endif; ?>

    <! –etc for other pages in my navigation –>


Viewing 1 replies (of 1 total)
  • Could anyone please take a look at this and offer some help? I would appreciate it.

    It doesn’t matter what I enter in the (home) argument – nothing will show. I’m at a loss.

    Thank you.

Viewing 1 replies (of 1 total)
  • The topic ‘Get posts in a category in floated div’ is closed to new replies.