Tagged: 

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

    #99657

    Hi!

    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.

    Regards,

    Peter

    #99658

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

    #99659

    Hi mgma,

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

    Regards,

    Devin

    #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!

    #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).

    #99663

    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?

    Thanks

    #99664

    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";
    query_posts($avia_config['new_query']);
    }
    }
    }
    add_action( 'avia_action_query_check' , 'loop_portfolio_query', 10, 1 );

    #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?

    #99666

    Got it. Thanks Dude!

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

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