Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

Most Recent Posts Slider: Pull From Each Category

Old Sep 13, 2012, 10:21 AM
136 posts · May 2010
Okay so I finally figured out how to get the most recent post from multiple categories to pull properly.

This is the most basic of basic index.php to do this and pull it into the loop.

      <div id="content">
  // array of category IDs
  $categories =  array(4, 5, 6);

  foreach ($categories as $cat) :
    $post = false;
    $post = get_posts('cat='.$cat.'&posts_per_page=1');
    if($post) :
      $post = $post[0];
    <?php endif; ?>
  <?php endforeach; ?>
  <?php get_sidebar(); ?>
   <?php get_footer(); ?>
What I am trying to do is get the Most Recent Posts Slider to have this functionality.

I am so basic at php that I am struggling to know where to take this code and insert it.

I know it's not a ton but I would be willing to donate $10 to anyone who can help me get this put where it needs to go.


Old Sep 13, 2012, 10:28 AM
136 posts · May 2010
I do not need it to function in the output fields in the Setting areas or have that aspect cleaned up after removing other variables, etc. I just need it to function properly, I can handle editing categories that are pulled etc, if I ever need to change them in the code itself.



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exclude category from Recent Posts in sidebar paulae Sidebars & Widgets 17 Apr 9, 2013 09:34 AM
Recent Post Slider PRES Center area post/pages 1 Mar 15, 2012 02:00 PM
[SOLVED] Recent posts of same category, on single post pages GeoParadise Atahualpa 3 Wordpress theme 10 Apr 19, 2010 09:54 AM
[SOLVED] Removing a Post from the Recent Posts Category Chloe Sidebars & Widgets 3 Mar 17, 2010 02:06 PM
[SOLVED] Is there a way to automatically pull out certain posts onto a new page lotusblossomk Atahualpa 3 Wordpress theme 2 Nov 12, 2009 07:01 AM

All times are GMT -6. The time now is 09:22 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.