• Resolved ecstasyi

    (@ecstasyi)


    Hello,
    I want to create a half border around the post block starting after the post image and all the way down until the bottom border just like a red border in the image here.
    Please help me achieve this design. Thank you.
    Looking forward.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Elvin

    (@ejcabquina)

    Hi there,

    I think you need to modify the structure of the post cards to wrap the contents, effectively separating it from the image so your borders only apply to the contents.

    Here’s a PHP snippet to put that “html wrapper”.

    add_action( 'wpsp_before_header', function( $settings ) {
        if ( 1234 === (int) $settings['list_id'] ) {
            echo '<div class="wpsp-content-wrap">';
        }
    });
    
    add_action('wpsp_after_content',function( $settings ){
        if ( 1234 === (int) $settings['list_id'] ) {
            echo '</div>';
        }
    });

    Change 1234 to the WPSP list you intend to apply this.

    And then add this CSS:

    .wpsp-content-wrap {
        position: relative;
        border-bottom: 1px solid red;
        border-left: 1px solid red;
        border-right: 1px solid red;
    }
    Thread Starter ecstasyi

    (@ecstasyi)

    Thank you for the solution ??
    Some adjustment is required as you can see in the image here.

    Plugin Support Elvin

    (@ejcabquina)

    Try adding this CSS:

    .wp-show-posts-image {
        margin-bottom: 0;
    }
    
    .wpsp-content-wrap {
        padding-top: 20px;
    }

    Adjust the padding to your preference. ??

    Thread Starter ecstasyi

    (@ecstasyi)

    Perfect! Thank you so very much, Elvin. You’re a savior ??

    • This reply was modified 3 years ago by ecstasyi.
    Plugin Support Elvin

    (@ejcabquina)

    No problem. Glad you got it sorted. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Half border around post block’ is closed to new replies.