Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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,
    Trevor

    #384323

    Hi 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!
    Ismael

    #385046

    Hallo,

    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

    #385704

    Hi!

    Send us a WordPress login please.

    Cheers!
    Elliott

    #385742

    I’ve also tried adding that code to functions.php and had no luck.

    #385954
    This reply has been marked as private.
    #386591

    Hey!


    @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,
    Elliott

    #386593
    This reply has been marked as private.
    #387388

    Hi!

    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,
    Elliott

    #387400
    This reply has been marked as private.
    #387882

    Hi!

    Please do so and let us know Trevor so we can mark the thread as resolved or assist you futher :)

    Best regards,
    Yigit

    #387901

    Could 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,
    Trevor

    #388179

    Hey!

    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,
    Ismael

    #388272

    Awesome! 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

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Re-order Recent Portfolio Additions?’ is closed to new replies.