Social share shortcode
Shortcode Generator [ easy-social-share ] Shortcode
Before you start make any settings here you have to choose the type of the shortcode you are looking for:
- Shortcode to display social share buttons
- Shortcode to display native social buttons
- Shortcode to display total shares
- Version 1.x general shortcode
When you make your choice by one click start to fill the settings.
[ easy-social-share ] Shortcode
SOCIAL SHARE BUTTONS
Social Networks – choose from the list the networks you want to add by shortcode. You can reorder them by drag and drop.
More button function – choose a function available for more button
COUNTERS
Include Counters – tick off to activate counters to the buttons that you will add with shortcode to your site
Counter position – choose from the list position for the counters if you have activated Include Counters option
Total counter position – choose from the list position for the total counter if you have activated Include Counters option
BUTTON STYLE
Hide network names – choose to hide network names, hide and display them on hover or do not hide them.
Full width share buttons – tick off to arrange the buttons on full window width. The width of buttons when this option is activated depends on their count – when you have a few buttons their width will be greater than when you have more active buttons.
Full width share buttons single element width correction – write number between 1 and 100 in percents to correct the width of the button itself. For example if the buttons displayed are more and are too close each other write here small percentage number (50) to make them smaller and fit in the window width. And the opposite, if the buttons are fewer and the space between them is big, fill in here number close to 100. This will make them locate closer each other.
Fixed width share buttons – activate this to make possible customizing width of the buttons.
Fixed width button width – write fix width for the buttons, displayed width this shortcode only. For example if you write here 100, all the buttons, displayed with this shortcode, will be 100 px each
Choose alignment of network name when fixed width is used – choose from the list alignment for network names. This setting will affect and counters too when Position inside or Inside name options are activated.
Display message above buttons – activate to include the message that you have been written at Message above share buttons field upon Display Settings -> Message above buttons at the plugin’s menu
Template – choose from the list template for the buttons activated with this shortcode only.
IMPORTANT! If you do not choose anything from the list the template of your shortcode buttons will be as default set. So if you want to generate shortcode with buttons at the same template options as these you have already made on your site, just do not make any choice here.
CUSTOMIZE SHARED MESSAGE
Share URL – paste here url that the buttons, displayed with this shordcode, will use. If you want the buttons to display the page/post they are located, let this field empty
Share Message – paste here custom message for the buttons, displayed with this shordcode. Let this field empty, if you would like to use as message the page/post title where buttons are displayed
ADDITIONAL DISPLAY OPTIONS
Display social buttons as sidebar – tick off to display current shortcode button’s settings made as sidebar
Choose sidebar position – choose from the list one of the possible positions for sidebar display method by shortcode
Display social buttons as popup – tick off to display current shortcode button’s settings made as popup
Display popup window after about of seconds – write in the field number to set popup to display after this number amount of time
Display social buttons as float from top – tick off to display current shortcode button’s settings made as float from top
Display social buttons as post vertical float – tick off to display current shortcode button’s settings made as post vertical float
Hide this shortcode display on mobile devices – tick off to disable button’s display for mobiles, when they are activated with this shortcode
SOCIAL SHARE BUTTON TEXTS
Social Network Names – use the field in this option to customize the default share text for each network. You can use any language.
When you finish with your settings click on Generate Shortcode. You will get three codes:
1. The first code will help you to display social share buttons anywhere on your site. Implement the shortcode with copy/paste at the Edit Post Page of the page where you would like to display the buttons with this shortcode. If you have been chosen Sidebar, Pop up or Post Vertical Float display methods when generating the shortcode paste the code at the bottom of the page content.
2. The second code will help you to add the shortcode at your WordPress theme. Insert this code into the template where you wish the buttons with this shortcode to be displayed.
For example if you paste this shortcode into footer template file the buttons set with this code will display only there. If you paste this shortcode into posts template file the buttons will display on each page marked as post page type.
3. The last two codes will help you to put the current post/page title and permalink (the full address of the post) into your shortcode. The most common situation you may need this codes is when you want to share the address of particular post when it is part of some kind of post list as resent posts for example. And when press any share button from this post list there will be shared the page address and the title of the each article itself. If you do not use these codes the buttons would share the url of the page where this post list is located, no matter the buttons refer to particular article from this list.
How these 3. codes are used?
Permalink
Get your second code (2.) and paste url=”‘.$url.'” before the last square bracket ( ] ). If we use the example from the picture, your code should look something like this:
And the last step is to add this code $url = get_permalink($post->ID); on the row before. So your final code should be on two rows and look like this:
You have to paste this two row code at any template file on you WordPress installation where you wish the buttons display by the shortcode prepared with Shortcode Generator.
Page title
If you want to add the page title the steps are the same. On the first row you have to put this code $title= get_the_title($post->ID); and on the second row you have to locate your 2. code with title=”‘.$title.'” before the last square bracket ( ] ). Your final shortcode should look something like this:
Page title and permalink both
To add the title of the page and the permalink for current article at the shortcode you just have to compleate the two described above actions in one code. And the final look of your shortcode should be something like this:
Insert it into the template, where you wish the buttons with this shortcode to be displayed.