Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #29552

    Not sure what I am doing wrong, but I can’t seem to get the order right (from newest to oldest). It works automatically for the portfolio section, but when I add it to another page it doesn’t work.

    http://i.imgur.com/suEPYtQ.png is an example on dev.sigmacreativeonline.com (towards the bottom of the page) where the items are showing oldest (on the left) to latest (on the right) instead of latest (on the left) to oldest (on the right).

    Please advise. Thank you for your time and consideration.

    Chris

    #140966

    Hey,

    You can use this plugin: http://wordpress.org/plugins/post-types-order/

    Or

    You can add this on functions.php

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

    You change ASC to DESC. Please refer to this link:

    http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    Regards,

    Ismael

    #140967

    Shouldn’t the order of all portfolios for Choices mirror the default order by publish date?

    #141274

    Hey,

    You can use this then:

    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 );

    Regards,
    Ismael

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

The topic ‘Portfolio Item Order Theme Page Template Builder’ is closed to new replies.