In this section, you can control social sharing services. Currently, section contains total twelve services:
- Facebook
- Twitter
- Linkedin
Google+ (Google+ Shutdown)
- Pinterest
- GoogleBookmarks New
- Reddit New
- Tumblr New
- StumbleUpon New
- Digg New
- VK New
- XING New
- Skype New
You can enable/disable any social sharing service as per your choice. Social sharing icons will appear on the blog page, blog post, WooCommerce product detail page, and product Quick View.
Note that social sharing icons on WooCommerce product detail page and product Quick View will appear only when social sharing is enabled in Theme Options » WooCommerce » Single Product and Theme Options » WooCommerce » Quick View.
Add Custom Sharing Services
It is possible that the above services are not sufficient, and you need a new service that is not included in the services mentioned above. In such a situation, you can add new service by adding custom code.
To do this, we provided a filter hook in the theme.
ciyashop_social_share_profiles
By using this filter hook, you can add custom function to add new sharing service to the existing list of sharing service. This filter accepts two arguments.
social_share_profiles
: Array of social share profiles.
post
: The Post object.
Here is an example code to add Blogger sharing service. Add this code to your child theme’s functions.php
file or via a plugin that allows custom functions to be added, such as the Code Snippets plugin. Please don’t add custom code directly to your parent theme’s functions.php
file as this will be wiped entirely when you update the theme.
/**
* Custom currency and currency symbol
*/
add_filter( 'ciyashop_social_share_profiles', 'ciyashop_child_add_custom_share_option_blogger', 10, 2 );
function ciyashop_child_add_custom_share_option_blogger( $social_share_profiles, $post ) {
$social_share_profiles['blogger'] = array(
'class' => 'blogger',
'icon_class'=> 'fa fa-link',
'link_base' => 'https://www.blogger.com/blog-this.g?u=%%url%%&n=%%title%%&t=%%text%%'
);
return $social_share_profiles;
}
If you see the code above, you will see that the link in the link_base
parameter contains some values, which are wrapped with %%. These values are the post/page data, which you can use in your sharing link as per the requirements of the social service’s sharing link structure. Details of these values are provided below:
%%url%%
: Post link/URL.
%%title%%
: Post title.
%%text%%
: Post excerpt.
Social Sharing
In this section, you can control social sharing services. Currently, section contains total twelve services:
Google+(Google+ Shutdown)You can enable/disable any social sharing service as per your choice. Social sharing icons will appear on the blog page, blog post, WooCommerce product detail page, and product Quick View.
Note that social sharing icons on WooCommerce product detail page and product Quick View will appear only when social sharing is enabled in Theme Options » WooCommerce » Single Product and Theme Options » WooCommerce » Quick View.
Add Custom Sharing Services
It is possible that the above services are not sufficient, and you need a new service that is not included in the services mentioned above. In such a situation, you can add new service by adding custom code.
To do this, we provided a filter hook in the theme.
ciyashop_social_share_profiles
By using this filter hook, you can add custom function to add new sharing service to the existing list of sharing service. This filter accepts two arguments.
social_share_profiles
: Array of social share profiles.post
: The Post object.Here is an example code to add Blogger sharing service. Add this code to your child theme’s
functions.php
file or via a plugin that allows custom functions to be added, such as the Code Snippets plugin. Please don’t add custom code directly to your parent theme’sfunctions.php
file as this will be wiped entirely when you update the theme.If you see the code above, you will see that the link in the
link_base
parameter contains some values, which are wrapped with %%. These values are the post/page data, which you can use in your sharing link as per the requirements of the social service’s sharing link structure. Details of these values are provided below:%%url%%
: Post link/URL.%%title%%
: Post title.%%text%%
: Post excerpt.