How do I order the portfolio be descending, the most recent appearing first in the categories.
Order Portfolio
5 posts from 3 voices-
Posted 9 months ago #
-
Add following code to the button of 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'] = "date"; $avia_config['new_query']['order'] = "DESC"; query_posts($avia_config['new_query']); } } } add_action( 'avia_action_query_check' , 'loop_portfolio_query', 10, 1 );Posted 9 months ago # -
Hi, isn't there a more intuitive way of managing what order the portfolio lists? I guess you'll loose this fix after an upgrade of the theme?
Posted 9 months ago # -
You could add this function to your child theme functions.php - in this case you won't loose the fix. In addition updates to functions.php are seldom and you can use ftp to update the other theme files without overwriting functions.php.
Posted 9 months ago # -
Thanks, It works well now. I put the code into the functions-eunoia.php.
Posted 8 months ago #
Topic Closed
This topic has been closed to new replies.














