• Resolved heytricia

    (@tendigit)


    I’m using my own css to style AddToAny buttons in a custom theme and have unchecked the ‘Use default css’ field. For posts, I’m letting the plugin settings place the buttons and all is fine. But I have a landing page template where I’m adding the buttons manually, and the plugin’s css is being added to the head of the page. How can I prevent the plugin from adding a style tag?

    I’m using this function in my template:

    <?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) {
            ADDTOANY_SHARE_SAVE_KIT( array( 'use_current_page' => true ) );
            } ?>
    <?php endif;?>

    Thanks – and Happy Friday!

    https://www.ads-software.com/plugins/add-to-any/

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

    (@micropat)

    Unchecking “Use default CSS” should prevent addtoany.min.css from loading, even if you’re using that template code. Did you purge the site’s cache, etc.?

    Thread Starter heytricia

    (@tendigit)

    Thanks for the quick response!

    It’s not loading addtoany.min.css, but it is loading a monster sized style tag to the head of the page, as well as icons.13.svg.css. So I’m having to override styles.

    This is in a password-protected staging area for now, so I can’t provide a link. Caching in staging and my browser is turned off.

    Plugin Author micropat

    (@micropat)

    That’s AddToAny’s core JavaScript dynamically (and most efficiently) loading the base CSS. While there’s not a way to outright disable the base CSS, overrides are the officially recommended way to go, i.e. square icons using the !important declaration.

    Thread Starter heytricia

    (@tendigit)

    Now that I inspect the elements of posts, I see this was the case there and I just didn’t notice. Sorry for any misunderstanding.

    If ever you decide to provide a way to remove the style tag and icon link, I would most definitely be interested in the update.

    Thanks again for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Prevent css from loading with manual placement’ is closed to new replies.