-
AuthorPosts
-
March 5, 2018 at 9:54 am #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?
March 5, 2018 at 7:56 pm #921738Hey 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.
March 6, 2018 at 4:08 am #922000Hi 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; }
March 6, 2018 at 10:29 am #922122Hi 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,
VictoriaMarch 7, 2018 at 11:15 am #922847Thanks 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
March 7, 2018 at 1:32 pm #922976actually, 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
March 8, 2018 at 7:00 am #923586Hi utemtu,
Here is a thread for you to consider
Best regards,
VictoriaMarch 8, 2018 at 8:29 am #923642thanks very much, changing the event setting resolved the issue :)
March 8, 2018 at 12:27 pm #923824Hi utemtu,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
VictoriaMay 16, 2018 at 4:00 pm #957558This reply has been marked as private.May 18, 2018 at 4:31 pm #958666Hi 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 -
AuthorPosts
- You must be logged in to reply to this topic.