Title: Issue with get_posts
Last modified: February 19, 2024

---

# Issue with get_posts

 *  Resolved [edelcambre](https://wordpress.org/support/users/edelcambre/)
 * (@edelcambre)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/issue-with-get_posts/)
 * Hello,
 * I installed the plugin, set a custom order with the override option set to true.
   It is working on my taxonomy term archive page : [https://www.epicentrefilms.com/films/vod/](https://www.epicentrefilms.com/films/vod/)(
   Bonheur Académie moved to 2nd position) but not on my homepage (V.O.D. section,
   just before twitter feed). This section uses a the get_posts() function with 
   those args.
 * But the found films are ordered by post date just like before. Have I done it
   wrong ?
 * Thanks
   Etienne
 *     ```wp-block-code
       $args = array(
         'post_type' => 'film',
         'numberposts' => 4,
         'suppress_filters' => 0,
         'tax_query' => array(
       	'relation' => 'AND',
       	array(
       		'taxonomy' => 'categorie-film',
       		'field'    => 'slug',
       		'terms'    => array('vod'),
       	),
         )
       ); 
       $films = get_posts($args) ;
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fissue-with-get_posts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * (@aurovrata)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/issue-with-get_posts/#post-17445922)
 * please read [FAQ](https://wordpress.org/plugins/reorder-post-within-categories/#faq)#
   10
 *  Thread Starter [edelcambre](https://wordpress.org/support/users/edelcambre/)
 * (@edelcambre)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/issue-with-get_posts/#post-17462642)
 * Hello,
   Ok thanks, the following snippet made the trick :
 * `add_filter('rpwc2_allow_custom_sort_orderby_override', 'override_orderby_sorting',
   10,5);
   function override_orderby_sorting($override, $wp_query, $taxonomy, $term_id,
   $type){return true ;}
 * I did not pay attention to it since I had the box checked in the admin, but apparently
   it was not sufficient.
   Thanks,Etienne
    -  This reply was modified 2 years, 3 months ago by [edelcambre](https://wordpress.org/support/users/edelcambre/).
 *  Plugin Author [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * (@aurovrata)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/issue-with-get_posts/#post-17518058)
 * > I did not pay attention to it since I had the box checked in the admin, but
   > apparently it was not sufficient.
 * Something else changed, because checking the box and the filter are the same.
   The filter simply allows more flexibility.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Issue with get_posts’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/reorder-post-within-categories_c18d38.
   svg)
 * [ReOrder Posts within Categories](https://wordpress.org/plugins/reorder-post-within-categories/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/reorder-post-within-categories/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/reorder-post-within-categories/)
 * [Active Topics](https://wordpress.org/support/plugin/reorder-post-within-categories/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/reorder-post-within-categories/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/reorder-post-within-categories/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/issue-with-get_posts/#post-17518058)
 * Status: resolved