Title: Get_posts not working
Last modified: August 20, 2016

---

# Get_posts not working

 *  [Hyp3R](https://wordpress.org/support/users/hyp3r/)
 * (@hyp3r)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/get_posts-not-working/)
 * Hello !
 * There is an issue when trying to use get_posts, it retrieves the last post instead
   of the specified section, query_posts works well with the same parameters, didn’t
   try the wp_query.
 * This is the code i am using (i just swap get_posts with query_posts and it works
   fine):
 *     ```
       <?php $args = array('section_name' => 'home');
       $query = get_posts($args);
       var_dump($query); ?>
       ```
   
 * I will try to dig a bit further in the plugin code to find out why this is not
   working.
 * [http://wordpress.org/extend/plugins/my-posts-order/](http://wordpress.org/extend/plugins/my-posts-order/)

The topic ‘Get_posts not working’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/my-posts-order_8e9dad.svg)
 * [My Post Order](https://wordpress.org/plugins/my-posts-order/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/my-posts-order/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/my-posts-order/)
 * [Active Topics](https://wordpress.org/support/plugin/my-posts-order/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/my-posts-order/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/my-posts-order/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Hyp3R](https://wordpress.org/support/users/hyp3r/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/get_posts-not-working/)
 * Status: not resolved