louisderrac
Forum Replies Created
-
Forum: Plugins
In reply to: [Scriptless Social Sharing] Add Mastodon buttonYes 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 anicon
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’sassets/svg
directory and the plugin will use it automatically. If you are using the older FontAwesome option, useicon
to add the CSS unicode for the icon.But where am I supposed to add this code ? Thanks a lot !
- This reply was modified 2 years, 3 months ago by Yui. Reason: formatting
Forum: Plugins
In reply to: [Easy Table of Contents] Table of content displayed on homepageThanks ! I try not to multiply plugins, but it worked !
Forum: Plugins
In reply to: [Easy Table of Contents] Table of content displayed on homepageIn the sidebar ? At the bottom ?
(I put it here as a widget in the sticky sidebar of my theme. it works great inside an article).
Forum: Plugins
In reply to: [Easy Table of Contents] Table of content displayed on homepageHi Thanks a lot for the quick answer. But the option is already disabled :/
Forum: Plugins
In reply to: [Sensei LMS - Online Courses, Quizzes, & Learning] Translation problemNote : I changed mu links. Here is the link of the course :
https://louisderrac.com/cours/introduction-aux-enjeux-de-la-culture-numerique-version-courte/