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);
Hi Arron!
Yes, the blog element does not support an orderby option at the moment and you must use the filter.
Best regards,
Peter
Thanks.
How about for Post Sliders? How do I add a filter to them?
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
Thanks…Great theme and excellent support. Worked like a charm