In this tutorial, i’ll provide the PHP code i tested which enables you to control the position you want both your sharing buttons and related posts to display.
The PHP code uses the Genesis hooks however you can simply change them to your own themes hooks.
If your theme doesn’t include hooks, you can use your apps shortcode or PHP from this link in a template file.
Here’s the before and after screenshots taken from my local development site.
Before Author Box
After Author Box
PHP Code
Please copy the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++
The first 2 lines of PHP code remove the author box from the default hook position to the entry content hook position. Check out the visual guide of all Genesis hooks positions.
The rest of the code hooks in the Shareaholic buttons in the genesis_entry_footer hook position. You can also fine tune the exact position your content outputs in different hooks positions using the 3rd parameter.
The code also includes the shortcode for the other app which is for Related Content / Recommendations. Remove this line of code from the above snippet if you are not using the related content app.
echo do_shortcode ('[shareaholic app="recommendations" id="<insert shareaholic app ID here>"]');
What You Need
You’ll need to know where to find your app’s shortcode. This is the code that will be used for any manual placement of your shareaholic apps in WordPress.
All you need from that shortcode is the i.d which you can simply replace with the one in the code snippet above.
Leave a Reply
You must be logged in to post a comment.