December 7, 2012 at 9:39 pm #18492
When viewing a portfolio template page, we would like the default ‘All’ sorting option…
<a href="#" data-filter="all_sort" class="all_sort_button active_sort">All</a>
… to display the products (blocks?) in that portfolio so that products in a certain category appear first.
( I think currently the all-sort filter displays newest products first? )
So if we have a portfolio called ‘Writing’ and the sort links are:
All / Best Sellers / Spelling / Grammer
And a user clicks on All (or when the page first loads) , they see all the products but the Best Sellers are at the top of the grid.
So this would require a js tweak and / or something else ?
Any pointers appreciated.December 8, 2012 at 8:36 am #99657
Afaik the “All” sort link will display the posts in the default order. You can try to use plugins like: http://wordpress.org/extend/plugins/post-types-order/ to change the default order.
PeterDecember 10, 2012 at 8:52 am #99658December 10, 2012 at 12:44 pm #99659December 10, 2012 at 10:11 pm #99660
Can we confirm with the developer? This has become an important issue… and I can’t seem to move any of these items in a portfolio… not by date, alphabetical, etc.
Thanks!December 11, 2012 at 6:47 am #99661
If you’re using the post types order plugin you need to sort it manually (it uses the menu order field to order the items). Otherwise they’re sorted by date. You can use the code I posted here: http://www.kriesi.at/support/topic/order-porfolio#post-84826 to change the portfolio order (probably won’t work with the post types order plugin).December 11, 2012 at 8:47 am #99663
Seems like they are now sorting by creation date (not modified, unfortunately). Do you know how I can simply reverse this?… so those created last are the ones at the top of any sortable grid?
ThanksDecember 11, 2012 at 8:58 am #99664
Following code should sort the entries by date (ascending order):
function loop_portfolio_query( $location )
if ( $location == 'loop-portfolio' )
$avia_config['new_query']['orderby'] = "date";
$avia_config['new_query']['order'] = "ASC";
add_action( 'avia_action_query_check' , 'loop_portfolio_query', 10, 1 );December 11, 2012 at 9:23 am #99665
Thanks!!! It doesn’t seem to work when I change the published date on the portfolio items. Still playing with it.
would I use “DESC” instead of “ASC” to reverse the date order?December 11, 2012 at 9:49 am #99666
The topic ‘Sorting within a Portfolio’ is closed to new replies.