Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #212016

    Wondering if it is possible to add orderby to av_blog?

    I am trying to list out a custom category of pages with works but need to the pages listed by menu_order.

    [av_blog blog_type='taxonomy' link='page-category,79' blog_style='blog-grid' columns='3' contents='title_read_more' content_length='content' preview_mode='auto' image_size='portfolio' items='all' offset='0' paginate='yes' orderby='menu_order']

    Do I need to add an extra filter to my functions page?

    function custom_post_grid_query( $query, $params ) {
    $query[‘orderby’] = ‘menu_order’;
    return $query;
    }
    add_filter( ‘avia_post_grid_query’, ‘custom_post_grid_query’, 10, 2);

    #212709

    Hi Arron!

    Yes, the blog element does not support an orderby option at the moment and you must use the filter.

    Best regards,
    Peter

    #212782

    Thanks.

    How about for Post Sliders? How do I add a filter to them?

    #212812

    Hi!

    You can use following code

    
    function custom_post_slide_query( $query, $params ) {
    $query['orderby'] = ‘menu_order’;
    return $query;
    }
    add_filter( ‘avia_post_slide_query’, ‘custom_post_slide_query’, 10, 2);
    

    Regards,
    Peter

    #212838

    Thanks…Great theme and excellent support. Worked like a charm

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Add orderby to av_blog’ is closed to new replies.