First, you'll need to know where to find an app's shortcode. This is the code that will be used for any manual placement of our apps in WordPress.
On the Shareaholic > Available Apps settings screen, press any of the active Edit buttons.* The app's shortcode containing its unique id number is displayed at the bottom of the Edit panel.
For Share Buttons:
[shareaholic app="share_buttons" id="xxxxx"]
For Related Content:
[shareaholic app="recommendations" id="xxxxx"]
* Note: Inactive Edit buttons can be activated by adding a check in the Above/Below Content placement box and pressing Save Changes at the bottom of the Available Apps page; once the Edit button is active (clickable), an ID has been generated for the app--you can then choose to remove the check from the box and still keep the app settings but not the automatic placement. This provides you with eight unique custom style configurations for Share Buttons and four for Related Content that you can still edit at any time.
Using Data Attributes
Our apps will automatically detect the post details, but if you are manually inserting them outside of your looped content, you can use the following data attributes** within the shortcode to customize.
title="This is my Page Title"
summary="You can place your own description of the page here."
[shareaholic app="share_buttons" id="xxxxx" title="Title of the Page being Shared" link="http://www.TheURLtoShare.com/page.html" summary="This is a description of the page that will be shared."]
If you would like to use WordPress functions to dynamically generate values, please reference this document.
** Note: Since version 22.214.171.124, Shareaholic for WordPress has supported link, title, and summary data attributes.
There are three different methods you can use to manually insert our apps into your WordPress blog. Select the method that meets your needs and follow the instructions provided.
The most commonly used method for customizing app placement is to call the app directly into your theme's template files using its unique shortcode. This ensures that our apps appear for all content where this template loads.
Even in the most basic themes, I recommend any changes made to a theme be applied via a child theme. This allows you to customize the theme without actually modifying the default template files. You are then free to remain on your theme's update schedule without having to fear the loss of your customization after an update.
If this is your first time editing a theme, you may be wondering how and where to do this. There is a Theme Editor built into your WordPress Admin. Enter it by going to Appearance > Editor. This is where you will be making changes to your child theme.
You'll see a dropdown menu at the top-right where you can select which theme you would like to edit, and beneath this is a list of all files used to render the theme (templates and stylesheets). When you select one of the files, it opens in the edit box to the left. Because themes and content layout vary from site to site, if you are having trouble determining which template files to modify, you may find this list helpful in identifying what each file does.
Once the appropriate file has been opened, you are likely to be a bit overwhelmed if unfamiliar with PHP. Don't let this intimidate you. At some point, most publishers will find themselves editing something in their theme, and first times are always scary. If you are working with a child theme (which you should be), don't worry about messing anything up. You can easily start over if something goes wrong.
In the edit box, scan the content of the file to see if you recognize any keywords that are indicative of where you are when viewing the template, such as entry or loop or comments. You can even use Google for help if you get stuck.
Since the release of version 126.96.36.199, we provide true WordPress shortcodes when calling your settings manually. To insert any of your Shareaholic configured apps into your template files, use the following structure:
<?php echo do_shortcode('[shortcode]'); ?>
<!-- Shareaholic Share Buttons -->
<?php echo do_shortcode('[shareaholic app="share_buttons" id="xxxxx"]'); ?>
Adding our apps into your template files is the most difficult manual insertion method, but it is often utilized when custom post types are present or when you would like to include our apps in the header or footer of your site. Once the shortcode is added into your theme, your work is done. Just clear all caches in any caching plugins (e.g., W3 Total Cache, WP Super Cache, ...) along with your browser's cache to see the changes on your site.
Solution: There is a plugin named Enhanced Text Widget that supports a variety of input. By installing this plugin, you are given an extra option type on your Widgets screen labeled Enhanced Text. Position this widget as you would the default Text widget. Now, you can add your Shareaholic app's unique shortcode directly into the widget Content box.
After editing the widget, press the Save button. Then, clear all caches in any caching plugins (e.g., W3 Total Cache, WP Super Cache, ...) along with your browser's cache to see the changes on your site.
The great thing about this method is that some themes provide you with extra widget areas, like in your footer. In these themes, you can bypass the Template insertion method and just add our apps by way of widget. Also, because these sections are outside of the content loop, Share Buttons will pull information of the current page instead of a specific post. You may want to use this method so that your readers can share a link directly to your main blogroll, category or tag feeds instead of being limited to only specific post and page content.
We do offer options to disable features of our plugin on individual pages and posts, and these toggles work for content that uses your standard post and page templates (but not for custom post types) if the content is automatically placed by our plugin.
One of the wonderful shortcode features is that you can include it directly in a Page/Post Edit box. Just switch to the Text tab and paste the shortcode anywhere within your content (e.g., above, below, in the middle, ...). No matter where it is placed in the edit box, it will still pull the same information when your content is shared.
There are many uses for this method:
You may want to include our apps multiple times in a post, but are limited to the Above Content and Below Content options for automatic placement.
You may want to insert them directly into your content, especially in longer posts where you'd like to prompt your readers to share after the first few paragraphs.
You may want to add Related Content in the middle of your post to keep their attention and encourage page surfing so that they'll stay on your site longer.
You may want to customize sharing of your content where you are using a variety of button styles to keep it fresh. Each of these styles can even feature different services.
You have eight editable Share Buttons apps and four Related Content apps, and there's even a way to create more apps! There are no limitations.
Shareaholic makes it easy to customize.
Whatever your needs or preferences, we have you covered. Enjoy!