• Resolved ajaxthemestudios

    (@ajaxthemestudios)


    Hi

    Thanks for this plugin. I disabled auto placement of social share buttons on my pages and I place the custom below in another location on the page. This is because I need the buttons to come after a number of other elements included in the page template.

    <?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>

    It works but with 2 issues: 1. The Share text does not work and 2. The Disable on this Page do not work for individual post.

    Is this how it works? Anyway around this?

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

    (@micropat)

    Yes, that’s how the template code by itself works since you’re basically hardcoding the share buttons.

    1. Add the sharing header HTML before your AddToAny PHP template code:
    <div class="addtoany_header">Share</div>

    2. Check whether sharing is disabled on the post/page in your PHP template code:

    <?php
    // If AddToAny exists, and sharing is not disabled for the post
    if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) && empty( get_post_meta( get_the_ID(), 'sharing_disabled', true ) ) ) {
    	ADDTOANY_SHARE_SAVE_KIT();
    }
    ?>
    Thread Starter ajaxthemestudios

    (@ajaxthemestudios)

    Thank you. That fixed it. Maybe this code should be added the FAQ.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable on Page don’t work with custom placement’ is closed to new replies.