Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #21916

    Hi, I want to sort my portfolio items just by date/name. I’m using Choices. I tried the plugin post type order but it does not order by date. Please help me to solve this issue. I have intermidiate skills on programmig so I can write the code if it does not exist just give me a little help.





    add following code to functions.php (insert it at the very bottom):

    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'] = "DESC";
    add_action( 'avia_action_query_check' , 'loop_portfolio_query', 10, 1 );

    You can replace “date” with “title” and “DESC” with “ASC”.

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

The topic ‘Choices Portfolio Sort By Date and Name’ is closed to new replies.