[Resolved] Social Share buttons only in post and fixed in sidebar

Home Forums Support Social Share buttons only in post and fixed in sidebar

Viewing 3 posts - 31 through 33 (of 33 total)
  • Author
    Posts
  • #914597
    David
    Staff
    Customer Support

    Hi there,

    so the Liberte site uses this set-up.

    1. Install the GP Social Share Plugin.
    2. Create a new Hook Element:

    https://docs.generatepress.com/article/hooks-element-overview/

    2.1 Add code this in the Hook content:

    <div class="floating-container">
    [gp-social]	
    </div>

    2.2 Select the after_entry_header hook
    2.3 Check the execute shortcodes check box.
    2.4 On Display Rules set Location: Posts > All Posts
    2.5 Publish

    3. Add this CSS:

    @media (min-width: 840px) {
        .floating-container {
            display: block;
            position: sticky !important;
            position: -webkit-sticky !important;
            top: 80px;
            height: 0;
        }
    
        #gp-social-share {
            top: 1em;
            flex-direction: column;
            left: -50px !important;
    
        }
    }

    You may need to tweak it to suit your padding etc.

    #914638
    JUAN JOSE GONZALEZ

    Great, David! I adjusted the left value to -150. I do love the final result. Thanks a lot for the help and the support. Keep doing the GOOD jog. Cheers

    #914651
    David
    Staff
    Customer Support

    Awesome – really glad to hear that!

Viewing 3 posts - 31 through 33 (of 33 total)
  • You must be logged in to reply to this topic.