Re-Positioning Shareaholic Sharing Buttons After Author Box

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 content

After Author Box

move buttons

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.

Related Posts


Comments

4 responses to “Re-Positioning Shareaholic Sharing Buttons After Author Box”

  1. Jeff Guynn Avatar

    Shareaholic? Where have I been? Addthis, check. Sharethis, check. Shareaholic? Is this a Genesis preferred social sharing thing?

    1. Brad Dalton Avatar
      Brad Dalton

      hahaha. Not sure why but it took forever to load locally. I think it used to be named sexy bookmarks or something along those lines and they may have re-branded it.

      It also includes related posts which isn’t a bad idea but must be a drain on resources. Looks pretty nice though and worth a look.

      I personally like Jetpack sharing which is pretty basic but easy to customize and reposition.

      1. Thanks for the writeup!

        As you pointed out, almost all other Related Content plugins tax a server’s overhead with numerous queries and use inefficient caching to the extent that they’re outright banned from running on hosting services like WP-Engine (for instance, Yet Another Related Content plugin is not allowed on WP-Engine as it taxes servers).

        In Shareaholic’s case, we do ALL the Related Content processing on Shareaholic servers, so zero drain on your resources!

        It costs us thousands of dollars each month in CDN, server, etc fees to make sure we deliver the fastest and best service to you. We do it because we believe it is the right thing to do as by doing so it makes sure your websites run as fast as possible.

        Please feel free to reach out if you have any other questions!

        1. Brad Dalton Avatar
          Brad Dalton

          Didn’t know that so i’m glad you stopped by to explain Jay.

          The only issue i had was finding the shortcode with i.d as its displayed at the bottom of a popup which doesn’t allow scrolling so it didn’t show on a small screen.

          Apart from that it wasn’t difficult for me to add the code in a custom function.

          I would have thought PHP would be more efficient than a shortcode though not that it would make a big difference.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.