Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #731210

    Hi,
    I’m using the ‘Enfold latest portfolio’ widget to display future events. Therefore it would be nice if the first occurring event would be on top. How can I reverse the order in which the portfolio entries are displayed in the widget?

    #732242
    #732253

    Hi Andy,

    I think that works for a portfolio post gird, but it doesn’t seem to affect the WIDGET i’m using in the footer.

    #733860

    Hi,

    This is possible but you have to modify one of the parent theme files. Edit the framework > php > class-framework-widgets.php file then look for this code around line 484:

    $new_query = array("posts_per_page"=>$count,"post_type"=>$this->avia_post_type);
    

    .. replace it with:

    $new_query = array("orderby" => "date", "order" => "ASC", "posts_per_page"=>$count,"post_type"=>$this->avia_post_type);
    

    Best regards,
    Ismael

    #737242

    Hey Ismael,

    I gave it a try. The code wasn’t around line 484 though, but I found it in line 967. Changed it there, but it had no effect…

    Regards,
    Jan

    #737245

    Maybe it has something to do with the plugin ‘No Future Posts’ I’m using. it changes the post status from “future” to “publish” so that I can include future dates into the portfolio which I’m using as an event calendar.

    • This reply was modified 7 years, 11 months ago by graphicsplus.
    #738904

    Hi,

    Can you please try de-activating the plugin and check if that helps?
    If you have not made any changes on the file, you should find it on 484th line – http://i.imgur.com/dqDJthF.png

    Best regards,
    Yigit

    #784701

    Hi guys,

    I’ve been on holiday so wasn’t able to respond to this topic for a while.

    I have changed the class-framework-widgets.php file in the parent theme, but didn’t find the code on the 484th line. It was on line 967. I haven’t changed the class-framework-widgets.php file in any other way. I’ve also checked the class-framework-widgets.php file in another website where I’m also using the Enfold theme, which has never had the ‘No Future Posts’ plugin installed and there the code is also on line 967…

    If I disable the ‘No Future Posts’ plugin all the entries in the portfolio and in the portfolio widget disappear as they all have future dates (I’m using it as a future event calendar).

    This isn’t a critical issue, but it would be nice to be able to tell my client I got it to work. ;)

    #786107

    Hi,

    You should be able to find the code around line 484. By the way, you should update the theme to the latest version, 4.0.5.

    Best regards,
    Ismael

    #786241

    Hi Ismael,

    That’s what you all keep saying to me, but I’m sorry, the code is NOT on line 484, I’ve checked in several installs of Enfold that I’m running (latest version), and everywhere the code is in line 967 as I explained in my last post. Even so I have replaced the code with what you suggest but that has no effect. Even after updating this install to version 4.0.5.

    #786831

    Hi,

    Thank you for the update.

    There were extra spaces in every other line of the code, which is why you can’t see the correct position. Anyway, we modified the next query to make it work. Please remove browser cache before checking the page.

    Best regards,
    Ismael3

    #786982

    Awesome! Thanks for looking into it Ismael.

    #787373

    Hi,

    Glad we could help!
    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    To know more about enfold features please check – http://kriesi.at/documentation/enfold/
    Thank you for using Enfold :)

    Best regards,
    Basilis

    #1114577

    Hi
    I have tried this for the sorting order of Latest Portfolios Widget, but the order was not affected, it remains descending. Maybe something has changed since 4.0.5?

    #1114674

    Hi parosweb,

    Which version are you running?

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1114838

    Hi Victoria
    Thanks for the swift reply!
    I run version! (4.5.7) with child theme.
    You can find a display of latest portfolio here: https://www.parospark.com/on-sunday-2-june-we-invite-you-to-paros-park-for-the-world-environment-day/
    I’ve just done a full back-up. Please let me know when you’re done.
    Thanks a lot!

    #1115468

    Hi,

    Thank you for the update.

    The above modification is for the Portfolio Widget, which is different from the Portfolio Grid element. You can actually adjust the order of the items directly from the element’s panel. Edit the Portfolio Grid element, scroll down a bit and you should see the “Order by” and “Display order” settings. Let us know if it works.

    Best regards,
    Ismael

    #1115469

    Hi,
    It’s the order in the portfolio widget, which I would like to reverse.
    Thank you

    #1115484

    Hey!

    My bad. I missed the link to the single portfolio page, so I actually thought you are referring to the portfolio grid elements in the home page. We’d like to edit the widget file, but the Appearance > Editor panel is not accessible. Please enable it or create a new thread and post the FTP details in the private field.

    Thank you for the update.

    Best regards,
    Ismael

    #1115486
    This reply has been marked as private.
    #1115864

    Hi
    Did you had the chance to have look?
    Thanks a lot
    Nicolas

    #1116043

    Hi,

    Sorry for the delay. We modified line 1129 of the same file.

    $this->avia_new_query = array("orderby"=>"date", "order" => "ASC", "posts_per_page"=>10,"post_type"=>$this->avia_post_type); //set a custom query here
    

    You can adjust the “orderby” and “order” value if needed.

    Let us know if the order is correct.

    Best regards,
    Ismael

    #1116045

    Hi,
    The order is great! But not the category. It’s not filtering any.
    Needs to be hard coded as well?
    Regards
    Nicolas

    #1116056

    Hey!

    Yes, that might be necessary because there is no filter available to adjust the query, and we can’t use the pre_get_posts hook to alter it.

    Try to include the tax_query parameter in the query.

    $this->avia_new_query = array("orderby"=>"date", "order" => "ASC", "posts_per_page"=>10,"post_type"=>$this->avia_post_type, 'tax_query' => array(
    				array( 'taxonomy' => $this->avia_term,
    					   'field' => 'id',
    					   'terms' => explode(',', '1,2,3,4'),
    					   'operator' => 'IN')
    			 )); //set a custom query here

    `

    Replace ‘1,2,3,4’ with the actual ids of the portfolio categories.
    Best regards,
    Ismael

    #1116060

    Thanks.!
    It’s working as wanted.
    I’ll need to remember to edit the file on the next update.
    Nicolas

    #1116319

    Hi,
    Glad Ismael could help, unless there is anything else we can help with on this issue, shall we close this then?

    Best regards,
    Mike

Viewing 26 posts - 1 through 26 (of 26 total)
  • You must be logged in to reply to this topic.