get_posts order doesn’t work
-
Help please!
I have listing of five latest post on my website. The code is:
<ul> <?php $myposts = get_posts('numberposts=5&offset=0&order=ASC'); foreach($myposts as $post) :?> <li><a href="<?php the_permalink(); ?>"><?php the_title();?></a></li> <?php endforeach; ?> </ul>It used to work flawlessly but since my hosting company has moved to another server everything is screwed up. It lists first five posts instead of last. When I change order to “order=DESC” it’s still the same. And it’s not the cache problem. On my local installation of the site everything works like it should.
Any ideas?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘get_posts order doesn’t work’ is closed to new replies.