[Resolved] Floating Social Media

Home Forums Support [Resolved] Floating Social Media

Home Forums Support Floating Social Media

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1263662
    Samuel

    Hello,

    how can I replicate what David did?
    https://gpsites.co/liberte/bedtime-reading/
    https://generatepress.com/forums/topic/make-a-generateblock-sticky-on-scroll/#post-1263086

    That’s a really cool conversion. From what I understand, David used generator blocks Is that right? Then how come it scrolls all the way to the comments? So far, GB only operate in the content area. A step by step guide would be very cool ๐Ÿ™‚

    #1263961
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    He actually used this plugin: https://wordpress.org/plugins/gp-social-share-svg/

    Then he added a Hook Element to the after_entry_header hook with this content:

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

    Make sure to execute shortcodes and set the Display Rules to single posts.

    Then he added 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;
        }
    }
    #1264547
    Samuel

    Nice, thanks!

    #1265136
    Tom
    Lead Developer
    Lead Developer

    No problem ๐Ÿ™‚

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