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

    Hello,

    I use the Related Entries element via the shortcode [rpost] and the following code added to functions.php:

    function related_posts_shortcode( $attr ) {
    ob_start();
    get_template_part( ‘includes/related-posts’ );
    return ob_get_clean();
    }
    add_shortcode( ‘rpost’, ‘related_posts_shortcode’ );

    Everything is fine, except for paddings and margins. On large and medium screens, there is an unexpected padding on the right of the Related Entries element, which I would like to set to 0. And I also would like to change (decrease) the bottom padding and margin of this element for all screen sizes. Please see the link.

    Regards,
    Marina

    #1350869

    Hey Marina,
    Thank you for the link to your site, Please try this code in the General Styling ▸ Quick CSS field or in the WordPress ▸ Customize ▸ Additional CSS field:

    #main .avia_codeblock>.related_posts {
    	padding: 0;
    	margin: 0;
    }

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    #1350895

    Hello Mike,

    The code does not have any effect.

    Regards,
    Marina

    #1350897

    Hi,
    You have an error in your css, there is a ; before the css, please remove:
    2022-05-07_006.jpg
    Then clear your browser cache and check.

    Best regards,
    Mike

    #1350901

    Thank you very much, Mike! Now everything works )).

    Best regards,
    Marina

    #1350904

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Paddings and margins of the Related Entries element’ is closed to new replies.