Site logo

[Resolved] Sticky Sidebar Only on Custom Post Types

Home Forums Support [Resolved] Sticky Sidebar Only on Custom Post Types

Home Forums Support Sticky Sidebar Only on Custom Post Types

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

    Hey there,

    Im looking for the CSS necessary to make the right sidebar (A GP Block container) sticky, but I only want this to happen on a custom post type (the type is called “shoe_review”) – we’ve got a specific sidebar for this custom post type.

    Thanks in advance, I’ve already searched the forum but could only find CSS that would apply to the whole site.

    Cheers,
    Thomas

    #2524725
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to one of those posts ?

    #2525070
    Thomas
    #2525104
    Ying
    Staff
    Customer Support

    Hi Thomas,

    Try this CSS:

    @media(min-width: 769px) { 
    .single-shoe_review .inside-right-sidebar {
        position: sticky;
        top: 0;
    }
    }
    
    #2525409
    Thomas

    Boom 🙂 Worked a charm. Thanks to David and Yang, I’ve deployed your advice from this forum a ton in the past, first time I’ve had to ask for help!

    #2526559
    Ying
    Staff
    Customer Support

    Glad to hear that 🙂

    Don’t hesitate to open a support topic, we are happy to help!

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