How do I automatically include PHP in Wordpress excerpt? -
how automatically include following php script in wordpress posts?
<?php if ( function_exists( 'addtoany_share_save_kit' ) ) { addtoany_share_save_kit(); } ?>
i not familiar php , have assumed above code plugin using show social sharing buttons.
i hoping may have dealt adding elements excerpt automatically before , have code copy child theme functions.php
?
addtoany share buttons
plugin have options display @ bottom of excerpts
or 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 theme functions.php
file.
Comments
Post a Comment