• Resolved Almudenita11

    (@almudenita11)


    Time ago, I ask for help for this

    “I would like that pass events appears in the page in the reverse order, I mean, that de most recent appear firstly and later the older”.

    And you offer me this snippet:
    // Changes past event views to reverse chronological order
    function tribe_past_reverse_chronological ($post_object) {

    $past_ajax = (defined( ‘DOING_AJAX’ ) && DOING_AJAX && $_REQUEST[‘tribe_event_display’] === ‘past’) ? true : false;

    if(tribe_is_past() || $past_ajax) {
    $post_object = array_reverse($post_object);
    }

    return $post_object;
    }
    add_filter(‘the_posts’, ‘tribe_past_reverse_chronological’, 100);

    But now, with the update it stops to work, could you help me again, thanks.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • have you found a solution for your problem? thx

    Plugin Support Jaime

    (@jaimemarchwinski)

    Hi @almudenita11,

    Is it possible that it was removed from your functions.php file when you updated? Can you check if the code is still there?

    I hope that helps!

    Thanks,
    Jaime

    Thread Starter Almudenita11

    (@almudenita11)

    Hi @jaimemarchwinski,

    The code is in the same place where I put it (in a space in the theme where you can add code and time before it worked), but maybe because some change of theme is not working and I don’t know where I should add this code. In functions, but in what file exactly?

    Thanks

    Plugin Support Jaime

    (@jaimemarchwinski)

    Hi @almudenita11,

    You will want to add that code in your theme’s functions.php file.

    I hope that helps!

    Thanks,
    Jaime

    Thread Starter Almudenita11

    (@almudenita11)

    Hi @jaimemarchwinski,

    I have checked and the code in there, in the theme’s functions.php file.

    Why not is working??

    Thanks.

    Almudena.

    Plugin Support Jaime

    (@jaimemarchwinski)

    Hi @almudenita11,

    I’m not sure why it’s not working there for you. Do you get any error messages if you enable WP_DEBUG?

    Does it work with a bare install of just our plugin and a default WordPress theme, like Twentynineteen?

    I hope that helps!

    Thanks,
    Jaime

    Thread Starter Almudenita11

    (@almudenita11)

    I got it! I think child theme was not working and functions.php was delete the code.

    Thanks, Jaime.

    Almudena.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Snippet to reverse events’ is closed to new replies.