Home › Forums › Themes Support › Myha › Haru recent news not showing the correct order
- This topic has 1 reply, 2 voices, and was last updated 2 years, 3 months ago by
admin.
-
AuthorPosts
-
February 4, 2021 at 7:05 pm #8311
Hello,
I have a problem with the Haru Recent News widget when using “Home 1” style for my homepage. Before this I was using Home 4 and it displayed the order correctly, but now on Home 1 I cannot make it to display properly.
I want it to display my blog entries from newest to oldest, from left to right, so I put order by date and descending but it does not display the correct order, it even does not change the order if I put by date and descending. I also tried to order by post ID, descending, random and others and I had no success.
I am showing 3 post per page and in most cases it only shows the 3 oldest Blog posts.Please, ¿how can I make it to work correctly?
Thank you very much
February 5, 2021 at 2:30 am #8314Hi,
Thanks for contacting us and choosing our product!
First of all that seems your support time is expired. So please renew your order to continue get support in future.
About this issue we checked our code and see they are similar for 4 style recent news.
In this case you can go to: wp-content/plugins/haru-myha-core/templates/recent-news/ then open file carousel.php or other file if you choose other style.
Change the code from:$args = array( 'posts_per_page' => $posts_per_page, 'orderby' => $orderby, 'order' => $order, 'category_name' => strtolower($category), 'post_status' => 'publish' ); // If data_source = list_id if ( $data_source == 'list_id' ) { $args = array( 'posts_per_page' => $posts_per_page, 'orderby' => $orderby, 'order' => $order, 'post_status' => 'publish', 'post__in' => explode( ',' , $post_ids ) ); }
to
$args = array( 'posts_per_page' => $posts_per_page, 'orderby' => $orderby, 'order' => $order, 'suppress_filters' => true, 'category_name' => strtolower($category), 'post_status' => 'publish' ); // If data_source = list_id if ( $data_source == 'list_id' ) { $args = array( 'posts_per_page' => $posts_per_page, 'orderby' => $orderby, 'order' => $order, 'suppress_filters' => true, 'post_status' => 'publish', 'post__in' => explode( ',' , $post_ids ) ); }
The change is add this:
'suppress_filters' => true,
If it still doesn’t work please send us your site URL and admin account. We’ll check it for you. That’s seem some plugins cause this issue by modify query.
Hope this helps!****
Regards,
HaruTheme -
AuthorPosts
You must be logged in to reply to this topic.