-
AuthorPosts
-
January 22, 2015 at 4:00 pm #383732
Hi,
I have noticed that the Recent Portfolio Additions (in Portfolio Items Sidebar) and Recent Work (in Footer) widgets grab the items based on their order in my portfolio, not by the date they were posted. I am using the Post Types Order plugin to re-order my portfolio items, so the most recent posts are not necessary the first items in my portfolio. As a result, new portfolio posts don’t appear in Recent Portfolio Additions or Recent Work.
Is there a fix/workaround for this problem?
Thanks,
TrevorJanuary 23, 2015 at 1:05 pm #384323Hi trevorjohnston!
Thank you for using Enfold.
I’m sorry but we don’t provide support for third party plugins so instead of using the Post Types Order plugin, you can add this on functions.php:
function custom_post_grid_query( $query, $params ) { $query['orderby'] = 'menu_order'; $query['order'] = 'ASC'; return $query; } add_filter( 'avia_post_grid_query', 'custom_post_grid_query', 10, 2); add_filter('avf_portfolio_cpt_args', 'avf_portfolio_add_custom_fields', 1); function avf_portfolio_add_custom_fields($args) { $args['supports'] = array('title','thumbnail','excerpt','editor','comments', 'custom-fields', 'page-attributes'); return $args; }
Edit the portfolio items then look for the Page Attributes > Order metabox. Insert a number to manually reposition the items. You can do this on the Quick Edit screen.
Cheers!
IsmaelJanuary 25, 2015 at 3:55 am #385046Hallo,
I tried with this function and also with Post Types Order plugin but neither give any result in ordering the portfolio elements
Please see http://naqshbandi.sufi.it/
Thank you Mauro
January 26, 2015 at 6:53 pm #385704Hi!
Send us a WordPress login please.
Cheers!
ElliottJanuary 26, 2015 at 7:17 pm #385742I’ve also tried adding that code to functions.php and had no luck.
January 27, 2015 at 12:53 am #385954This reply has been marked as private.January 27, 2015 at 9:22 pm #386591Hey!
@profumopuntoit, I checked your portfolio page but your using the Masonry shortcode. For that see here, http://kriesi.at/documentation/enfold/change-the-sort-order-of-masonry-elements/.
@trevorjohnston, Send us a WordPress login and we’ll take a look.Regards,
ElliottJanuary 27, 2015 at 9:24 pm #386593This reply has been marked as private.January 28, 2015 at 9:31 pm #387388Hi!
I didn’t see the code anywhere in your functions.php file or in the parent theme functions.php file. Add that in to the bottom of the file and deactivate the Post Types Order plugin.
Regards,
ElliottJanuary 28, 2015 at 9:47 pm #387400This reply has been marked as private.January 29, 2015 at 6:35 pm #387882Hi!
Please do so and let us know Trevor so we can mark the thread as resolved or assist you futher :)
Best regards,
YigitJanuary 29, 2015 at 6:59 pm #387901Could you please answer the two questions asked in my last email? (below)
Just to clarify, should I be adding the code to the functions.php file in the parent or child theme? Where exactly should it be pasted into the functions.php file? It would be helpful if you can add a screen shot.
Thanks,
TrevorJanuary 30, 2015 at 9:55 am #388179Hey!
You can add the code on the child theme’s functions.php but if it doesn’t work there, please try it on the parent theme’s. Right at the bottom of the file. Edit the portfolio item’s Order attribute manually. I tested this on my installation and it works fine, just like the post type order without the drag and drop feature. Please remove browser cache before testing the page, just in case.
Regards,
IsmaelJanuary 30, 2015 at 3:02 pm #388272Awesome! Works exactly as advertised. Just out of curiosity, I deactivated the Post Types Order plugin as you instructed, then made the change to functions.php. Amazingly it saved all portfolio items in the correct order. No manual re-ordering needed. I even flushed the cache to be sure. How’d it do that? :-)
Thanks for your help.
Trevor
-
AuthorPosts
- The topic ‘Re-order Recent Portfolio Additions?’ is closed to new replies.