• This is driving me mad. I’ve been working on this all day – pulling things from the codex left and right and for crying out loud .. I can’t get it.

    Basically, I have two categories. One for the company news and one for articles. What I’m TRYING to do is have three columns in the footer. The first column will pull the last five posts to the ‘news’ category (id 1) the second column will pull the last fix posts from the ‘dev.news’ category (id 3 [no idea why 3, but hey …]) and the last column is just a log in for a 3rd party tool we use.

    The problem I’m having is .. well, it just won’t work! I can get it to pull news, but both columns pull the same news. The second column will drop the date.

    NO idea what I’m doing wrong. Probably just because I’m using the same coding for both columns but I have no clue what do to get this to work.

    Here is my code:

    <?php
     $postslist = get_posts('numberposts=5&order=ASC&orderby=post_title&in_category=1');
     foreach ($postslist as $post) :
        setup_postdata($post);
     ?>
     <div>
     <?php the_date(); ?>
     <br />
     <?php the_title(); ?>
     </div>
     <?php endforeach; ?>

    The other will have in_category=3 naturally. But then drop out the_date() information.

    Any help and ideas are GREATLY appreciated!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adding recent posts in footer’ is closed to new replies.