By default the portfolio loads the newest posts from right to left. Is there anyway to change it to load from left to right. I want the newest to be in the top left corner.
Portfolio Sorting Question
9 posts from 3 voices-
Posted 2 years ago #
-
You can change the order by editing the query string. Open up template_portfolio.php and replace following line:
$query_string .= "&cat=".$k_option['portfolio']['matrix_slider_port_final'][$post->ID]."&paged=$paged";with:
$query_string .= "&cat=".$k_option['portfolio']['matrix_slider_port_final'][$post->ID]."&paged=$paged&order=ASC";Posted 2 years ago # -
This changed the order, but unfortunately they are still not listed from newest to oldest. The newest portfolio image is in the bottom left and the oldest in top right.
I also tried to change it to DSC instead, but it is still sorting right to left as newest is in top right and oldest in bottom left.
Any other ideas?
Posted 2 years ago # -
Hey,
The code Dude provided should work, I'll test it later and get back to you if I find a solution.
James
Posted 2 years ago # -
Was a solution ever found for this? It would be great to get this working as right now I have to switch each of the publishing dates to get the order I want.
Posted 2 years ago # -
Try to open up template_portfolio.php and replace following line:
$query_string .= "&cat=".$k_option['portfolio']['matrix_slider_port_final'][$post->ID]."&paged=$paged";with:
$query_string .= "&cat=".$k_option['portfolio']['matrix_slider_port_final'][$post->ID]."&paged=$paged&order=ASC&orderby=date";You can replace ASC with DESC - it depends on the order of your entries.
Posted 2 years ago # -
Sorry, still didn't work. Using the code with the DESC is what I currently have. The problem is that they still align newest to oldest right to left rather than left to right. I want the newest to be in the top left and oldest in the bottom right. Any more ideas?
Posted 2 years ago # -
Mmmm.... then we can't change the sorting behaviour without a complete query rewrite. WordPress doesn't offer other order parameters - only ASC and DESC.
Posted 2 years ago # -
Ohhh, that's too bad. Having the posts align right-left goes against common reading and it is pain to re-order every time....oh well.
Posted 2 years ago #
Reply
You must log in to post.














