Skip to content

Instantly share code, notes, and snippets.

Last active November 27, 2023 23:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
mu-plugins | addtoany
Plugin Name: AddToAny Filter
Description: Add AddToAny after content
Author: Salvatore Noschese
Author URI:
Version: 1.0
defined( 'ABSPATH' ) || exit;
add_filter('the_content', 'custom_add_to_any_after_content');
if (!function_exists('custom_add_to_any_after_content')) {
function custom_add_to_any_after_content($content) {
if (is_single())
$content .= '
<!-- AddToAny BEGIN -->
<div class="a2a_kit a2a_kit_size_32 a2a_default_style print-no">
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" />
<br />
<a class="a2a_dd" href=""></a>
<a class="a2a_button_facebook"></a>
<a class="a2a_button_reddit"></a>
<a class="a2a_button_twitter"></a>
<a class="a2a_button_telegram"></a>
<a class="a2a_button_whatsapp"></a>
<a class="a2a_button_copy_link"></a>
<a class="a2a_button_email"></a>
<a class="a2a_button_printfriendly"></a>
<br />
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" />
<script async src=""></script>
<!-- AddToAny END -->
return $content;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment