Home Forums WoodMart support forum Related blog posts layout problem

Related blog posts layout problem

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #196457

    sophiemarquise
    Participant

    Hi,

    After the update I have a weird issue with the related blog posts on single post page. I’m using the Small Images Layout, and before the update my related blog posts displayed in carousel grid in a card (like the masonry layout). But after making the update, my related blog post layout is broken.

    My first blog post is displayed with the masonry style (class="blog-design-masonry") but the other one are displayed with small-images style on left and text content on right (class="blog-design-small-images“)…

    How can I fix this to have my old layout with all my related blog posts in the carousel to be displayed in masonry style ? Just like before.

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #196471

    sophiemarquise
    Participant

    I’ve looked in single.php and there is well defined the masonry layout for related blog posts :

    <?php
    
    					if ( woodmart_get_opt( 'blog_related_posts' ) ) {
    					    $args = woodmart_get_related_posts_args( $post->ID );
    
    					    $query = new WP_Query( $args );
    
    						 if( function_exists( 'woodmart_generate_posts_slider' ) ) echo woodmart_generate_posts_slider(array(
    							'title' => esc_html__('Related Posts', 'woodmart'),
    							'blog_design' => 'carousel',
    							'blog_carousel_design' => 'masonry',
    							'el_class' => 'related-posts-slider',
    							'slides_per_view' => 2
    						), $query);
    					}
    
    				?>
    #196579

    Artem Temos
    Keymaster

    Hello,

    Could you please disable all plugins that are not related to our theme and provide us your admin access so we can check it?

    Thank you in advance

    #196601

    sophiemarquise
    Participant

    Hi,

    I’m on localhost environnement for the moment. Is there a way to view where the problem is ? I didn’t have this problem before the update and did not install new plugins..

    #196617

    sophiemarquise
    Participant

    I don’t know why the class is changing for the next carousel post items, but I’ve wrote some css to make the old layout even with the “small-images” class in related-posts-slider :

    .related-posts-slider .blog-design-small-images.has-post-thumbnail .article-inner {
      display: block !important;
    }
    
    .related-posts-slider .blog-design-small-images.has-post-thumbnail .entry-header, .related-posts-slider  .blog-design-small-images.has-post-thumbnail .article-body-container {
      max-width: 100% !important;
    }
    
    .related-posts-slider .blog-design-small-images.has-post-thumbnail.blog-style-shadow .article-body-container {
      margin-left: 0px !important;
    }

    So, now I have the masonry style, but it’s not the “clean” way and dod not explain why the “blog-design-masonry” style is applied only for the first post and “blog-design-small-images” class is added for the next posts inside the carousel.

    #196614

    Artem Temos
    Keymaster

    Sorry, but we don’t know why it doesn’t work for you. Contact us when your website will be live on some remote hosting so we can check it ourselves.

Viewing 6 posts - 1 through 6 (of 6 total)