Unless youve been living under rock, you know how important it is to add share buttons to your blog or site to generate more traffic and help build a community around your brand, product, or point of view.
There are many plugins and widgets for WordPress that will add various share buttons, but adding a plugin or widget is not always the answer. Its very easy, using PressWork, to add Twitter, Facebook, and Google+ to you theme with a few simple lines of code that take advantage of PressWorks powerful custom actions.
I highly recommend that you read these docs to understand the first steps you need to take:
Using the Toolbox
One of the things that makes PressWork so powerful is its front-end editor, the Toolbox. With the Toolbox you can quickly and easily customize your site in minutes without using any code. However, if youre a developer or have a basic understanding of WordPress theming, the Toolbox offers a bunch or really powerful features like Hooks and Functions.
To help us add our share buttons were going to take advantage of the Hooks feature located in the first panel of the Toolbox Settings. Under Settings you can turn Hooks on. This will display guides that show you all the different actions you can hook into.
With Hooks turned on lets take a look at a single post page.
So, if want to add the share buttons to the bottom of each post we need to hook into pw_single_post_bottom.
Adding the code
Add the following code to your child themes actions.php file or your custom-actions.php file:
Thats it! You will want to add some CSS to make it pretty and align it to your themes design.