-
AuthorPosts
-
May 28, 2021 at 3:04 pm #1302855
Sorry, I think we closed this thread: https://kriesi.at/support/topic/bug-report-blog-posts-element
a bit too fast. I dug a bit deeper and found the problem.I am using the “blog posts” element from the builder. I don’t want the blog posts displayed by date. So I used the Snipped you provided: http://kriesi.at/documentation/enfold/change-the-sort-order-of-blog-posts-elements/
And added this code to my functions.php:
//blog post order -> menu order add_filter('avia_blog_post_query', 'avia_modify_post_grid_query_rand'); function avia_modify_post_grid_query_rand( $query ) { $query['orderby'] = 'menu_order'; $query['order'] = 'ASC'; return $query; }As soon as I do this, the Layout breaks. If i remove the snippet, everything works fine. Any idea why this is happening?
—
PHP (7.3.27)
Enfold (4.8.3)
Wordpress (5.7.2)-
This topic was modified 4 years, 5 months ago by
DUALWERK.
May 31, 2021 at 5:21 pm #1303235Hey,
Thanks for contacting us!
I tested it on my local installation and it works as expected on my end. Have you enabled page attributes on posts? If not, please add following code to functions.php file of your child theme as well
add_action( 'admin_init', 'av_post_custom_order' ); function av_post_custom_order() { add_post_type_support( 'post', 'page-attributes' ); }Best regards,
YigitJune 8, 2021 at 12:04 pm #1304618I found the problem. It was something completely different. There was a button shortcode in one of my blogposts. So when this particular post was displayed it broke the layout.
Is this a known bug?
June 10, 2021 at 5:01 am #1304979 -
This topic was modified 4 years, 5 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
