Sharing posts

I see from this advertisement you can share posts on the integrity theme. I am using Ethos, can I share posts on facebook , pinterest etc with the Ethos theme and how would I do it?

Hi There,

You can add the social share shortcode in the post content:

[x_share title="Share this post!" facebook="true" linkedin="true" email="true" google_plus="true"]

Do you want to add the social share icons below the content on every single post?

To do that, please setup a child theme first:

https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57

After that add this code under functions.php file locates in your child theme:

function x_add_social_sharing() {
    if ( is_singular('post') ) {
        echo do_shortcode('[x_share title="Share this post!" facebook="true" linkedin="true" email="true"]');
    }
}
add_action('x_before_the_content_end', 'x_add_social_sharing');

Hope it helps :slight_smile:

Thanks for that Thai. Could you possibly check out my page, I have already set up some icons and would like to use those instead of the ones in the shortcode, is that possible? I also need to add pinterest and pocket.

Hi There,

The pocket share is not available in the social share shortcode.

To add the Pinterest, Twitter share. Please update the previous code to this:

function x_add_social_sharing() {
    if ( is_singular('post') ) {
        echo do_shortcode('[x_share title="Share this post!" facebook="true" twitter="true" pinterest="true" email="true"]');
    }
}
add_action('x_before_the_content_end', 'x_add_social_sharing');

Hope it helps :slight_smile:

Thanks, can you tell me if I can change the icons please. Or are they set permanently in the shortcode?

Hi There,

Icons are set within the X theme shortcode internally. If you want to change it, you need to customize it accordingly, but it is outside the scope of our support.

All the allowable icon parameters are listed here (http://demo.theme.co/integrity-1/shortcodes/entry-share/).

facebook: input “true” to activate share link.
twitter: input “true” to activate share link.
google_plus: input “true” to activate share link.
linkedin: input “true” to activate share link.
pinterest: input “true” to activate share link.
reddit: input “true” to activate share link.
email: input “true” to activate share link.

If you’re interested in customizing, you can review this thread to get started. You will need to have a child theme and add the code suggested on the thread in the functions.php file of the child theme.

Notice that each of the social sharing icon has a data-x-icon attribute. Each of the icon has its specific value which you can get from FontAwesome. Please check this thread on that as well.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.