In the plugin’s FAQ there is a function to add new buttons: https://es.ww.wp.xz.cn/plugins/scriptless-social-sharing/#faq
Did you tried it?
Yes I have seen this part :
= How can I add a custom sharing button? =
It has always been possible to add a custom sharing button with custom code, but version 3.2.0 makes this a little easier by creating a new helper function. You’ll access the helper function by using a filter. Here’s an example of how to add a button to share a post to Tumblr:
add_filter( 'scriptlesssocialsharing_register', 'prefix_scriptless_add_tumblr_button' );
/**
* Adds a custom sharing button to Scriptless Social Sharing.
*
* @return void
*/
function prefix_scriptless_add_tumblr_button( $buttons ) {
$buttons['tumblr'] = array(
'label' => __( 'Tumblr', 'scriptless-social-sharing' ),
'url_base' => 'https://www.tumblr.com/share/link',
'args' => array(
'query_args' => array(
'name' => '%%title%%',
'url' => '%%permalink%%',
),
'color' => '#35465c',
'svg' => 'tumblr-square', // Use this with the SVG icons and add the SVG file to your theme's <code>assets/svg</code> folder
'icon' => 'f173', // Use this when using the FontAwesome font for icons
),
);
return $buttons;
}
The %% are used to designate placeholders for the attribute variables that the plugin will apply when building the button.
Note that there is both an svg and an icon argument in the code sample. svg is preferred, but only applies if you are using the SVG option for the sharing icons. To add a new icon, upload it to your theme’s assets/svg directory and the plugin will use it automatically. If you are using the older FontAwesome option, use icon to add the CSS unicode for the icon.
But where am I supposed to add this code ? Thanks a lot !
-
This reply was modified 3 years, 6 months ago by
Yui. Reason: formatting
Usually in the active theme’s functions.php file, or with a plugin like Code Snippets
I installed this code as a snippet, and got the option for a Tumblr button, but that’s not what I want. I wanted Yummly – and Mastodon – so I tried to change the above code according to Yummly’s instructions on adding a button, but it didn’t work.
How do we find the correct code?
I tried this again. I got it to make a button that just links to the Yumly homepage. But when I entered the Yumly base URL for sharing, Yumly disappeared in the plugin options.