Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16049

    Hey guys,

    just a small thing in an amazing theme: Is there a way to manually sort the categories in the filterable portfolios instead of having it sorted by the name?

    Thanks in advance!

    Simon

    #89965

    Hi,

    Open includes > helper-template-logic.php, find this code

    $avia_config['new_query'] = array(	'orderby' 	=> 'ID',
    'order' => 'ASC',
    'paged' => get_query_var( 'paged' ),
    'posts_per_page' => $itemcount,
    'tax_query' => array( array( 'taxonomy' => 'portfolio_entries',
    'field' => 'id',
    'terms' => $terms,
    'operator' => 'IN')));

    Replace it with

    $avia_config['new_query'] = array(	'orderby' 	=> 'ID',
    'orderby' => 'date',
    'order' => 'ASC',
    'paged' => get_query_var( 'paged' ),
    'posts_per_page' => $itemcount,
    'tax_query' => array( array( 'taxonomy' => 'portfolio_entries',
    'field' => 'id',
    'terms' => $terms,
    'operator' => 'IN')));

    You can change orderby & order parameters. This link might help. http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    Regards,

    Ismael

    #89966

    Ok, I think I was a bit unclear here. I need to manually order the sub-menu that allows me to filter the different categories in the filterable portfolio instead of by the name (and not the posts itself).

    Maybe you have an easy tweak for that as well? :-)

    Thanks!

    #89967

    I found the fix for that with the plugin ‘Category Order and Taxonomy Terms Order’. Does the trick with ease…

    #89968

    Hey,

    My bad. I thought you are talking about sorting the portfolio items. Glad you fixed it. :)

    Regards,

    Ismael

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

The topic ‘Order Categories in filterable portfolio’ is closed to new replies.