Title: PHP code &quot;broken&quot; with new update
Last modified: August 30, 2016

---

# PHP code "broken" with new update

 *  Resolved [everythingbelton.com](https://wordpress.org/support/users/everythingbeltoncom/)
 * (@everythingbeltoncom)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/php-code-broken-with-new-update/)
 * First–absolutely love this plugin.
 * Second–having a little problem. On the main page of my site (everythingbelton.
   com) we run posts and events. They are ordered by the date they are published.
   In order to achieve this, we previously inserted this snippet into the functions
   php:
 * add_action( ‘pre_get_posts’, ‘tribe_post_date_ordering’, 51 );
 * function tribe_post_date_ordering( $query ) {
    if ( ! empty( $query->tribe_is_multi_posttype)){
   remove_filter( ‘posts_fields’, array( ‘Tribe__Events__Query’, ‘multi_type_posts_fields’));
   $query->set( ‘order’, ‘DESC’ ); } }
 * When we updated to the latest version of the Events Calendar the snippet no longer
   works. WordPress looked into it but couldn’t figure out why it was no longer 
   working. They told me to contact the developers so that perhaps I could get a
   rewrite or a fix.
 * In the meantime, I’ve reverted back to the old version–which I love. 🙂 Have 
   a great day folks! Hope to hear from you soon.
 * [https://wordpress.org/plugins/the-events-calendar/](https://wordpress.org/plugins/the-events-calendar/)

Viewing 1 replies (of 1 total)

 *  [Brook](https://wordpress.org/support/users/brook-tribe/)
 * (@brook-tribe)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/php-code-broken-with-new-update/#post-6259635)
 * Howdy everythingbelton.com,
 * I am sorry to hear you are having an issue with that snippet. I see you are using
   the update version of the snippet that we published just prior to launching 3.10.
   It is working excellent for me, sorting events by their pubdate.
 * Could you try doing a conflict test, but putting that snippet in a stock theme
   for testing purposes like Twenty Fourteeen? [This guide walks you through how to test for a conflict, and then identify what is conflicting.](http://m.tri.be/r6)
 * Cheers!
    – Brook

Viewing 1 replies (of 1 total)

The topic ‘PHP code "broken" with new update’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Brook](https://wordpress.org/support/users/brook-tribe/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/php-code-broken-with-new-update/#post-6259635)
 * Status: resolved