I have a custom post type “bar”.
I have a blog grid
I want to order them Alphabetically
I added the following code in the functions file:
add_filter(‘avia_post_slide_query’,’avia_change_grid_order’, 10, 2);
function avia_change_grid_order($query, $params)
{
$query[‘orderby’] = ‘title’;
$query[‘order’] = ‘ASC’;
return $query;
}
But it does not seem to be working, in fact I am not sure how it is ordering them now.
I dont really want to add another sorting plugin.
Page: https://www.gayberlin4u.com/gay-bars-berlin/
Any advice?
Keith
Hey roamingk,
How are you ordering the bar post type?
Best regards,
Basilis
At the moment I have them set to “display all”. I don’t have any date filter.. and am using the code as mentioned in the previous post. Is there a way to order custom posts in Enfold back end that I am missing?
Hi roamingk,
Please have a look at the following thread:
https://wordpress.stackexchange.com/questions/65494/custom-post-type-order-field
If you need further assistance please let us know.
Best regards,
Victoria
Hi roamingk,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria