[wp-trac] Re: [WordPress Trac] #7326: get_posts not working properly

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 21 14:22:20 GMT 2008


#7326: get_posts not working properly
------------------------------+---------------------------------------------
 Reporter:  wpcandy           |        Owner:  pyadav  
     Type:  defect            |       Status:  assigned
 Priority:  high              |    Milestone:  2.6.2   
Component:  General           |      Version:  2.6     
 Severity:  blocker           |   Resolution:          
 Keywords:  needs-unit-tests  |  
------------------------------+---------------------------------------------
Comment (by tandilboy):

 the dump attached by me is for:

 {{{
  <?php
  global $post;
  $myposts = get_posts('numberposts=1&offset=0&category=24');
  foreach($myposts as $post) :
  setup_postdata($post);
  ?>
     <img src="<?php bloginfo('stylesheet_directory');
 ?>/images/alerta.gif" alt="Destacada" /><a href="<?php the_permalink();
 ?>"><?php the_title(); ?></a>
  <?php endforeach; ?>
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7326#comment:21>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list