-
AuthorPosts
-
June 27, 2014 at 6:48 pm #284688
Hey guys,
I am revisiting this for a 2nd time because the original attempt isn’t working very well.
This is a very high maintenance client, so this needs to be working correctly.
For each portfolio item, they need to be sorted in a specific order. There are several galleries, and within each gallery are sweveral items.
For every gallery item, each item needs to be in a specific order. How can I obtain this? The post-type-order plugin jumbles everything up. I tried taht several times with no luck. What other solutions can you offer?What I originally did was added this within the functions file to help define order:
/*
* portfolio sort order
*/
add_filter(‘avia_masonry_entries_query’, ‘avia_random_image_query’, 10, 2);
function avia_random_image_query($query, $params)
{
if(empty($query[‘post_mime_type’]))
{
$query[‘orderby’] = “menu_order”;
$query[‘order’] = ‘ASC’;
}return $query;
}It’s not responding like it should where each item within each gallery is order in a specific way.
Thanks!June 30, 2014 at 7:29 am #285077Hey Justin!
I think what you’re trying to do is not possible with wordpress and Enfold out of the box and you must hire someone to implement this feature. You can sort the portfolio entries by date or title but then you can’t apply a custom sort order to each portfolio because the title/date order is always the same. If you use the menu_order parameter you can just define one custom order (which will be used on all portfolio pages) because the menu_order value is saved one time for each portfolio entry and you can’t change it based on the portfolio page. You can try to use http://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-post-types-order/ which at least enables you to apply a custom sort order to category/archive pages and afaik you can set a different order for each category. However this solution introduces another limitation because 1) you can only use it with the archive.php template and 2) you must make sure all portfolio entries share the same category.
Cheers!
Peter -
AuthorPosts
- You must be logged in to reply to this topic.