Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #647531

    Hello the team,

    I try to display the 3 last items from a category of my portfolio (It’s easy, thank you).

    BUT, i need them displayed in the ASC order.

    Is it possible ?

    Best regards.

    #648950

    Hey hurraken,

    Thank you for using Enfold.

    How did you display the items? Did you use the portfolio grid element? If yes, try to use the “avia_post_grid_query” filter to alter the query. Please provide a link to the actual page so that we can inspect it.

    Best regards,
    Ismael

    #651590

    Hello,

    Yes, i use the portfolio grid element and the “avia_post_grid_query” filter.

    Here’s the informations in the private area.
    Best regards.

    #652470

    Hi,

    How did you use the filter? Please post the code here. Try this to add this query in the existing filter:

    $query['orderby'] = 'title';
    $query['order'] = 'ASC';
    

    Best regards,
    Ismael

    #653888

    Hello Ismael,

    I add this code to my functions.php (child theme) :

    add_filter('avia_post_grid_query', 'avf_custom_post_grid_query');
    
    function avf_custom_post_grid_query ( $query ) {
    $query['orderby'] = 'date';
    $query['order'] = 'ASC';
    return $query;
    }

    But it’s not what i need. It’s alter the whole query

    I need the 3 last events display in ASC order.

    But i don’t know if it’s possible.

    Regards

    • This reply was modified 8 years, 6 months ago by hurraken.
    #655116

    Hi,

    This is the only portfolio grid element in the page, right? Add the is_page or the is_home conditional function.

    Best regards,
    Ismael

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