-
Posted in : BookCard WP
-
how i can sort the portfolio images in alphabetic order.
well thanks but that wont work, with the plugin you have to manually sort it and thats not the idea…, I know it can be coded but I didnt find where but today i find it and it works soooo here I share…,
look in Appearance -> Editor for ‘page_inner-portfolio.php’ and search for :
$args_portfolio = array( ‘post_type’ => ‘portfolio’, ‘posts_per_page’ => -1
and add this :
, ‘orderby’ => ‘title’, ‘order’ => ‘ASC’
The whole line will end looking like this:
$args_portfolio = array( ‘post_type’ => ‘portfolio’, ‘posts_per_page’ => -1, ‘orderby’ => ‘title’, ‘order’ => ‘ASC’ );
* everything will depend how you want to order it here is all the orderby parameter you can apply:
– When it to appearance > editor
– then I selected “page_inner-portfolio.php”
– found the line that says:
$args_portfolio = array( ‘post_type’ => ‘portfolio’, ‘posts_per_page’ => -1 );and then changed it to:
$args_portfolio = array( ‘post_type’ => ‘portfolio’, ‘posts_per_page’ => -1, ‘orderby’ => ‘title’, ‘order’ => ‘ASC’ );
Then I hit update file, and when I got out to the front end none of my portfolio items are showing up.
I’ve followed the instructions in the last post and its not working, What am I doing wrong?
Hi,
There is invalid code character in the plain text. Please copy this code line:
$args_portfolio = array( 'post_type' => 'portfolio', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC' );
Thanks
I tried this and various other methods suggested elsewhere, and it does arrange them on the portfolio page as desired, but once you open an image, if you use the big arrows at the top of the page to scroll to the next or previous portfolio item, the order does not match – still as per original order. Also similar problems with Post Types Order Plugin.
If anyone else like myself, just wants to re-order their portfolio in a different order to which they created the Portfolio Items, simply edit the ‘Published date’ in each.
Not sure if this is really obvious, but I spent HOURS before finding this solution so thought I’d share!If you have some departments and some portfolio items on the portfolio page, is there a way to arrange them in alphabetical order? I tried changing the code as above but that only ordered the portfolio items and not the departments.
Hi, you can try the following plugin.
You must be logged in and have valid license to reply to this topic.