Article sections
Overview
Creating a custom display or position is a unique function of Easy Social Share Buttons for WordPress. The idea behind this is to become a full replacement of the typical shortcode for the share buttons.
Even that in Easy Social Share Buttons for WordPress you have 30+ display positions sometimes you may need a different type of integration. Till now those integrations are done with a shortcode embed in the template of a builder or directly in the theme code (or function call).
This method of integration has 3 major cons that most of the users have faced:
- A change in the style is required to open the template or theme file and modify the shortcode. That is even more annoying if you have used it several times.
- If you decide to temporarily stop the display you should edit the template or theme files.
- The shortcode can be limited in supported options.
Create and Manage Custom Display / Position
The list of custom display/positions you can find in Where to Display -> Custom Display / Positions.
If you need to create a new display simply press the “Add New Custom Display/Position” button and fill your name. When you confirm the form the new display will appear automatically in the list and it will also appear automatically in display positions of the plugin.
Using Custom Display/Position on Site
Shortcode / Function Call
On the list of custom positions, you will find quick instructions for adding each of the displays inside content or code when you are using shortcode or function call.
Shortcode
To add the display anywhere inside the content you have a shortcode [ social-share-display ] that can be used – you can use copy/paste.
Shortcode Arguments
Argument | Description |
---|---|
design | Custom display/position ID |
force | Always showDisplay the custom display/position even when the position is not marked as active in the Where to Display menu.Possible values
|
archve | Archive templateSet to Yes if you include this code in an archive template to make it share correct information.Possible values
|
custom | Custom share detailsSet to Yes to use the possible custom share parameters.Possible values
|
url | Custom share URL |
message | Custom share message |
image | Custom share image |
tweet | Custom tweet |
jetengine | Only if you are using the shortcode in JetEngine Listing template. The option is made to collect the correct post sharing information.Possible values
|
Function Call
You also have a ready function call snippet for your theme that you can use with copy/paste.
<?php if (function_exists("essb_custom_position_draw")) { essb_custom_position_draw(positionID, alwaysShow); } ?>
Elementor Page Builder
If you are using Elementor Page builder there is a dedicated widget that you can use to add a specific custom display/position anywhere in content or Elementor template.
Block Editor