I’m using MailPoet version 6.8.1 and having an issue with Automatic Latest Content block not following our theme’s custom blog sorting.
Current situation:
We have customized our theme to sort blog posts by modified date;
This custom sorting works correctly on our website’s blog page;
However, MailPoet’s Automatic Latest Content block seems to ignore this custom sorting
The block still shows posts in a different order (likely by published date)
Technical details:
Theme is using custom code/settings to sort posts by modified date
This sorting is not using standard WordPress query parameters:
function custom_sort_blog_module_by_update_date($query, $args) {if (isset($args[‘module_id’]) && $args[‘module_id’] === ‘custom-blog-by-update-date’) {// Modify the query to order by modified date$query->query_vars[‘orderby’] = ‘modified’;$query->query_vars[‘order’] = ‘DESC’; // Change to ‘ASC’ if you want ascending order$query = new WP_Query($query->query_vars);}return $query;}add_filter(‘et_builder_blog_query’, ‘custom_sort_blog_module_by_update_date’, 10, 2);