Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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 3 years, 6 months ago by DUALWERK.
    #1303235

    Hey,

    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,
    Yigit

    #1304618

    I 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?

    #1304979

    Hi,

    We are not aware of that problem no, could you post a link to where we can see it please? I tried checking the problem page you linked to above, but it leads to a 404 page.

    Best regards,
    Rikard

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