Support » Plugin: AddToAny Share Buttons » Hiding/Showing Floating Bar on Specific Pages/Posts/etc.

  • Resolved habitualmom

    (@habitualmom)



    Hello! When I use this code (CSS code to your “Additional CSS” box in AddToAny settings:
    body:not(.single-post) .a2a_floating_style { display: none; }), it removes the floating vertical share bar from all pages. Is it possible to hide on all except blog posts and features? I need more flexibility in where I can show/hide the floating bar.

    Thank you!

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

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

    (@micropat)

    Hello! The reason that CSS code isn’t working is because your current theme isn’t outputting the class attribute for the <body> tag.

    In one of your theme’s files (probably a header.php), you should replace <body> with <body <?php body_class(); ?>> as shown in the documentation for body_class().

    Thank you

    Do I have to add specific pages between the () in order to specify which pages shouldn’t get the floating menu?

    Plugin Author micropat

    (@micropat)

    If you’re referring to body_class(), no. That function automatically outputs the expected class names on a page, such as single-post, etc.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hiding/Showing Floating Bar on Specific Pages/Posts/etc.’ is closed to new replies.