Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #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.



    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.




    Thanks Dude. What is a “default” order? What is the criteria?


    Hi mgma,

    I believe the default ordering is by data with newest first.




    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.



    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: https://kriesi.at/support/topic/order-porfolio#post-84826 to change the portfolio order (probably won’t work with the post types order plugin).


    Thanks Dude.

    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?



    Following code should sort the entries by date (ascending order):

    function loop_portfolio_query( $location )
    if ( $location == 'loop-portfolio' )
    global $avia_config;
    if(isset($avia_config['new_query'])) {
    $avia_config['new_query']['orderby'] = "date";
    $avia_config['new_query']['order'] = "ASC";
    add_action( 'avia_action_query_check' , 'loop_portfolio_query', 10, 1 );


    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?


    Got it. Thanks Dude!

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Sorting within a Portfolio’ is closed to new replies.