Support Forums for LiveMesh Themes & Plugins › Forums › Agile Theme Support › Portfolio Re-order not working
- This topic has 11 replies, 3 voices, and was last updated 9 years, 7 months ago by ontwerpjezelf.
-
AuthorPosts
-
September 11, 2014 at 12:08 pm #9117ontwerpjezelfMember
Hello,
I previously had Agile theme version 1.2 and upgraded to 3.0 this week.
The portfolio section on the page ‘home’ is now showing the order of published items within the portfolio. [img1] / [img3]
This is not the right order as I have previously used the ‘re-order’ function to re-order the items to display as I want. For me this is very important as this is the work I want to display on the homepage. [img2]
Can you please help me out getting the re-order function to work again?
I am clueless.September 11, 2014 at 12:09 pm #9121ontwerpjezelfMemberThis reply has been marked as private.September 13, 2014 at 12:48 pm #9172VeenaModeratorPls modify the files portfolio-functions.php and post-functions.php as follows
1.Modify portfolio-functions.php line no:13
$query_args = array('post_type' => 'portfolio', 'posts_per_page' => $args['posts_per_page'], 'filterable' => $args['filterable'], 'paged' => $paged, 'order' => 'ASC', 'orderby'=>'ID');
$loop = new WP_Query(array('post_type' => $post_type, 'posts_per_page' => $post_count, 'order' => 'ASC', 'orderby'=>'ID'));
2.2 Modify post-functions.php line no:503
$loop = new WP_Query(array('post_type' => $post_type, 'posts_per_page' => $post_count, 'order' => 'ASC', 'orderby'=>'ID', 'tax_query' => array(array( 'taxonomy' => $taxonomy, 'field' => 'slug', 'terms' => explode(',', $terms) ))));
Also pls go to the following link and refer the section “order and orderby parameters”,you will get the possible parameters for order and orderby
http://codex.wordpress.org/Class_Reference/WP_QueryYour final code should be as in portfolio-functions.png and post-functions.png
September 15, 2014 at 8:04 am #9196ontwerpjezelfMemberI have modified the files like above and my code looks like in the attached PNG files.
( P.S. The extra line of loop code on line 144 of the portfolio-functions.php breaks the homepage portfolio entireally. $loop = new WP_Query(array(‘post_type’ => $post_type, ‘posts_per_page’ => $post_count, ‘order’ => ‘ASC’, ‘orderby’=>’ID’)); so I left this out )
However this code change does not produce the desired results in any way.
On the homepage the order is not changed at all. machielvangelder.nl > workAll that works here is setting the publish date manually. The re-order function did work perfectly in the older version of Agile.
Then when clicking towards the filterable portfolio. http://machielvangelder.nl/filterable-portfolio/ there is another order but still not the order I specified in the re-order plugin. [IMG2] as attached.
Can you please help me out here, as I am applying for jobs and really need to show my work both at the homepage and portfolio in the right order. If you need FTP to fix it I can send it in a private message.
The only thing that seems
September 15, 2014 at 8:12 am #9199ontwerpjezelfMemberThis reply has been marked as private.September 16, 2014 at 5:48 am #9233VeenaModeratorI am not able to login in to your database with the above given FTP login credentials.
Kindly recheck it and confirm, forward it.
Otherwise
Pls modify the files portfolio-functions.php and post-functions.php as follows
(Instead of orderby ID give menu-order)
1.Modify portfolio-functions.php line no:13 as given below$query_args = array('post_type' => 'portfolio', 'posts_per_page' => $args['posts_per_page'], 'filterable' => $args['filterable'], 'paged' => $paged, 'order' => 'ASC', 'orderby'=>'menu_order');
September 16, 2014 at 5:49 am #9235VeenaModerator2.1. Modify post-functions.php line no:503
$loop = new WP_Query(array('post_type' => $post_type, 'posts_per_page' => $post_count, 'order' => 'ASC', 'orderby'=>'menu_order'));
September 16, 2014 at 5:51 am #9236VeenaModerator2.2 Modify post-functions.php line no:505
$loop = new WP_Query(array('post_type' => $post_type, 'posts_per_page' => $post_count, 'order' => 'ASC', 'orderby'=>'menu_order', 'tax_query' => array(array( 'taxonomy' => $taxonomy, 'field' => 'slug', 'terms' => explode(',', $terms) ))));
September 16, 2014 at 8:05 am #9239ontwerpjezelfMemberOk this now works for the filterable portfolio section on http://machielvangelder.nl/filterable-portfolio/
However unfortunately it still doesn’t work for the “Work” Section on the homepage. As I previously mentioned I need them to be in the same order as it has worked before in version 1.x of the theme.
For the post-functions.php you are talking about modifying line 503 and line 505.
In my post-functions.php I find these lines to be at 525 and 531.Maybe there is a difference there? I have added the php files so you can take a look.
September 16, 2014 at 8:38 am #9244ontwerpjezelfMemberThis reply has been marked as private.September 16, 2014 at 5:52 pm #9264RaghavendraModeratorHad to change the file portfolio-functions.php at line number 144. It is working now. Pls check.
September 17, 2014 at 7:24 am #9274ontwerpjezelfMemberAwesome stuff it is now working. Thanks
-
AuthorPosts
- The topic ‘Portfolio Re-order not working’ is closed to new replies.