• scazzino

    (@scazzino)


    Hi,

    I’m using AddToAny to add sharing and follow buttons. I’m using the Reusable Blocks Extended plugin so that I can make one follow button menu and use it in the header and footer as a single synced widget. That works, but AddToAny is also adding the sharing buttons above the follow buttons in both the header and footer. This is probably because the Reusable Blocks Extended plugin makes Reusable Blocks into posts that may be then inserted elsewhere, so AddToAny is probably treating them as posts.

    There’s no additional placement entry in the AddToAny settings where this could be turned off. I guess I could hide them with CSS, but it would be better if there were a placement entry in the settings that I could turn off. Is this a problem with Reusable Blocks Extended not providing the proper identification for AddToAny to handle the new post type? Other custom post types I’m using do show up in the placement settings.

    Thanks for any input.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter scazzino

    (@scazzino)

    I was able to hide them by adding the <!–nosharesave–> comment in the block. That works but would need to be added to all blocks.

    I see there’s some code that can remove it from all of a specific post type. I’ll see if I can use that instead.

    Thread Starter scazzino

    (@scazzino)

    Upon a little further investigation… The reusable blocks extended plugin actually just exposes/extends the wp_block admin interface rather than creating a new post type. That’s probably why AddToAny doesn’t show anything new in the placement settings. Trying to disable it on the ‘wp_block’ post type using the suggested php snippet in the faq doesn’t work. Probably since the wp_block isn’t the overall post_type, but just a subunit… So this doesn’t work, I still get extra share buttons in both the header and footer.

    function addtoany_disable_sharing_on_my_custom_post_type() {
        if ( 'wp_block' == get_post_type() ) {
            return true;
        }
    }
    add_filter( 'addtoany_sharing_disabled', 'addtoany_disable_sharing_on_my_custom_post_type' );

    I don’t want to disable it on the entire page, just within the Reusable Blocks Extended patterns/blocks in the header/footer where I’m using the Follow buttons widget…

    • This reply was modified 12 months ago by scazzino.
    Thread Starter scazzino

    (@scazzino)

    Going back to just using the comment <!–nosharesave–> for now.

    Let me know if anyone has a better way to disable it on Reusable Blocks Extended blocks only.

    Thread Starter scazzino

    (@scazzino)

    I ended up switching to use Widgets on Pages plugin to put the follow widgets in the header/footer instead of Reusable Blocks Extended. That got rid of the issue as no extra share buttons were rendered. This lets me keep and edit one single instance of the AddToAny Follow widget and use a shortcode to insert that single follow widget into both the header and footer.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to disable sharing buttons with Reusable Blocks Extended?’ is closed to new replies.