2.6 beta 1 get_posts bug?
-
Not sure if this is something to do with 2.6 beta 1 or if it’s just a coincidence that this problem started just after I upgraded my installation.
I have a page template (see code below) to show posts from category ‘8’ which worked fine before, but now it seems to be showing posts from all categories. (live page at https://www.daleanthony.com/portfolio/)
If this isn’t a bug and it’s just me being silly I would appreciate it if someone could offer some advice on how to fix this problem.
<?php get_header(); ?> <div id="content-container-wide"> <ul class="portfolioul"> <?php global $post; $myposts = get_posts('numberposts=9&offset=0&category=8'); foreach($myposts as $post) : setup_postdata($post); ?> <li> <img src="<?php echo get_post_meta($post->ID, "port-thumb", true); ?>" alt="<?php the_title(); ?> - Thumbnail"/> <span class="portfolio-title"><?php the_title(); ?></span> <span class="portfolio-work"><?php echo get_post_meta($post->ID, "port-project", true); ?></span> <div class="portfolio-description"><?php the_content(''); ?></div> </li> <?php endforeach; ?> </ul> </div> <div id="content-footer-wide"></div> </div> <?php get_footer(); ?>
Cheers.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘2.6 beta 1 get_posts bug?’ is closed to new replies.