Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #921367

    Firstly, love the theme.

    On our homepage, we are displaying Blog Posts using the built in content element. We would like to display the most recent 3 posts from our selected categories (currently all), however it is displaying oldest first.

    However our footer is displaying the most recent 6 blog posts, using the standard wordpress widget.

    How do we display most recent posts first with the Blog Posts content element?

    #921738

    Hey utemtu,

    I’m unable to view your site as it is password protected. Please check this link to change the post order https://kriesi.at/documentation/enfold/change-the-sort-order-of-blog-posts-elements/

    You can also try this plugin https://wordpress.org/plugins/post-types-order/

    Best regards,
    Vinay

    • This reply was modified 6 years, 8 months ago by Vinay.
    #922000

    Hi There,

    I updated Functions.php according to your article, but it doesn’t seem to make a difference. Tried with the options below (I also tried using ‘post_date’). I have created a temp login to our site for you.

    
    /*
     *  Change Order By of Blog Posts in content element
     *  https://kriesi.at/documentation/enfold/change-the-sort-order-of-blog-posts-elements/
     */
    add_filter('avia_blog_post_query', 'avia_modify_post_grid_query_desc');
    function avia_modify_post_grid_query_desc( $query ) {
    $query['orderby'] = 'date';
    $query['order'] = 'DESC';
    return $query;
    }
    

    And

    
    /*
     *  Change Order By of Blog Posts in content element
     *  https://kriesi.at/documentation/enfold/change-the-sort-order-of-blog-posts-elements/
     */
    add_filter('avia_blog_post_query', 'avia_modify_post_grid_query_desc');
    function avia_modify_post_grid_query_desc( $query ) {
    $query['orderby'] = 'date';
    $query['order'] = 'ASC';
    return $query;
    }
    
    #922122

    Hi utemtu,

    Please update the theme to the latest version. That should fix any issues you are currently experiencing :)

    To update to the latest version follow the simple instructions here. (Or if you want the super detailed explanation you can read this blog post)

    If that does not help, feel free to reply here and we will take a closer look at the issue. In that case please also add your WordPress login credentials (in the “private data” field) so we can take a look at your admin area.

    Best regards,
    Victoria

    #922847

    Thanks so much. Upgrade to theme done and Functions.php code is now working as expected.

    We can close this one now.

    p.s. I did upload “private data” last time

    #922976

    actually, this didn’t resolve the issue. one of the other users had configured an offset on the blog posts content element to make it look like the order by was working and I didn’t realise.

    So we are upgraded to the latest version and the following code has been applied to Functions.php

    
    /*
     *  Change Order By of Blog Posts in content element
     *  https://kriesi.at/documentation/enfold/change-the-sort-order-of-blog-posts-elements/
     */
    add_filter('avia_blog_post_query', 'avia_modify_post_grid_query_desc');
    function avia_modify_post_grid_query_desc( $query ) {
    $query['orderby'] = 'date';
    $query['order'] = 'ASC';
    return $query;
    }
    

    there is a login posted previously in the private comments section of comment https://kriesi.at/support/topic/blog-posts-content-element-display-newest-posts-first/#post-922000

    #923586

    Hi utemtu,

    Here is a thread for you to consider

    Best regards,
    Victoria

    #923642

    thanks very much, changing the event setting resolved the issue :)

    #923824

    Hi utemtu,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #957558
    This reply has been marked as private.
    #958666

    Hi Imaginacomm,

    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

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