Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1439752

    In one site I use Magazine element several times, but I would like that are in some of them the publication date is reversed.

    In connection with this post [https://kriesi.at/support/topic/magazine-reverse-the-order/] I was able to reverse the dates.
    However, I would like it not to be this way on all Magazine elements on the site, only on some specific ones.

    Can you make this function apply only on specific Magazine blocks that have an ID for example? Or are there other ways or methods?

    Thanks for help

    #1439900

    Hey Julien,
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function avf_magazine_entries_query_mod($query, $params)
    {
    if (is_page(3961)) {
    $query['order'] = 'ASC';
    }
    return $query;
    }
    add_filter('avf_magazine_entries_query', 'avf_magazine_entries_query_mod', 10, 2);

    adjust the page ID to suit.
    If you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
    Enfold_Support_2680.jpeg
    then add the above code and save.

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.