• Resolved tarielgr8

    (@tarielgr8)


    Hello,

    I have 1500+ posts on my WP site. I have a specific banner (Call Me type banner for advertising) added to the top of about 100 posts only via a shortcode.

    Can I make this banner/shortcode element sticky?

    of course I mean for all 100 pages, that have this banner on, not on just one.

    Thank you

    • This topic was modified 1 year, 1 month ago by tarielgr8.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Alexandru Tapuleasa

    (@talextech)

    Ideally that banner would have a class set that you can target it with but since that probably means you would need to edit 1500 posts I guess that’s not an option ??

    If the banner is the first link in each post, you could set the Sticky Element to be .entry a:first-child

    But please note that actually makes the first link in each post sticky so if the banner is not in all of theme, any other links that appears first in the post will be made sticky.

    Thread Starter tarielgr8

    (@tarielgr8)

    Thank you,

    As you see on the attached url the banner added via shortcode is the first clickable link on each of those 100 posts (Them I can edit easily if needed).

    So, should I try “.entry a:first-child” this way?

    Or something else?

    Plugin Author Alexandru Tapuleasa

    (@talextech)

    If you can add a class then do so, like “sticky-banner” in this screenshot https://prnt.sc/wBmnvnNFQR32

    Then set the Sticky Element to be “.sticky-banner”

    Otherwise use my first suggestion ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘make element sticky on only some posts (not all)’ is closed to new replies.