Share icon
#Share icon code
Insert the following line of code into this blank file: If your child theme doesn’t have a functions.php file yet, create a blank text file in your child theme’s root folder with the name functions, and change its extension to. With the help of this function you will be able to add the social icons wherever you want on your site by using a custom action hook. We will add a custom function to the child theme’s functions.php file. Step 3: Create a Custom Function that Displays the Icons In our case the extra functionality will be the custom social sharing buttons. It inherits everything (style and functionality) from the parent theme but you can add extra functionality to it. The child theme relates to the theme you currently use – in a somewhat similar way as a child relates to his parents. If you already have one, you can jump to Step 3. You can easily create a WP child theme with the help of our tutorial, or you can follow the steps of this WP Codex article. First of all you will need to create a child theme. Now you will have to add the generated icons and code to your site.
#Share icon download
Tick JavaScript, as it will enable the browser to detect the URL dynamically therefore your visitors will be able to share each post individually not just the URL of the home page.įinally take a look at the live preview, download the chosen icon set, and grab the code you generated. On this screen (below), you will find two options: ‘No JavaScript’ and ‘JavaScript’. When you are finished, you will have to fill your website’s info. Click next and tick the social networks you want to add to your site. Choose 1 from the 6 different button styles. To generate your custom buttons, go here and press Begin. The main advantage of this app is that the buttons it generates run on the frontend, therefore they won’t burden your server and you can also keep your users’ activities private. We will use the Simple Sharing Buttons Generator, a handy and easy-to-use web tool to generate the sharing icons. Step 1: Generate the Social Sharing Buttons In this tutorial, I will show you how you can easily add custom social sharing buttons to the end of the posts on your WordPress site with just a few lines of code. The good news is that you don’t necessarily need a plugin to accomplish this task. They tend to eat up resources like crazy, and why would anyone want to increase the plugin load time by 25-35% just to display some icons on their site? When I say well-behaving I mean simple, lightweight, resource-friendly, fast – most social sharing plugins out there are not like that.
![share icon share icon](https://cdn2.iconfinder.com/data/icons/the-circle-icons/513/share.png)
It may seem to be an easy task but adding well-behaving social sharing buttons to a WordPress site can be a hassle.