How do I automatically include the following PHP script in my WordPress posts?
<?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>
functions.php
AddToAny Share Buttons
plugin have options Display at the bottom of excerpts
or you can add code
function add_excerpt_social( $excerpt ) {
if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { return $excerpt.ADDTOANY_SHARE_SAVE_KIT(array("output_later" => true)); }
else { return $excerpt; }
}
add_filter('get_the_excerpt', 'add_excerpt_social');
to your theme functions.php
file.