Social sharing on the main archives on ethos theme

Hi everybody,

Is there a way to automatically insert the social sharing icons under each post of the main archives category pages? like this sample site: https://cupofjo.com. thank you in advance for all your help

Hi There,

Please add the following code under functions.php file locates in your child theme:

function x_add_social_sharing() {
	echo do_shortcode('[x_share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true" email="true"]');
}
add_action('the_content', 'x_add_social_sharing');

Hope it helps :slight_smile:

Hi Thai,

Thank you so much for your help, that worked it inserted the social icons but took away the post description is there anyway they both could show, thank again :slight_smile:

Summary

here is the url: http://neneproductions.com/vluv/topics/veganism/ oh and on the regular pages like home, contact… all the content is gone

Sorry for the confusion. This is not a feature offered by X and Pro. It could be possible with custom development but this would be outside the scope of our support. Though I can give you a code to make the sharing icons appear under the excerpt (description), all the sharing button under each post will share only the blog page so it’s really not a sharing function. That is because the Share shortcode was designed to be placed in a single post or page. It will share the URL of the post it’s inserted in.

You need to use a third party sharing plugin for this or we do have an in-house custom development team that offer paid services, who may be able to assist. They can be contacted at pinnacle@theme.co if this is of interest to you. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

Thank you for your understanding.

Hi Christian,

I totally understand. Could you give me that code for now, I would really appreciate it :slight_smile:

Hello There,

You can make use of this modified code:

 function x_add_social_sharing() {
echo do_shortcode(’[x_share title=“Share this Post” facebook=“true” twitter=“true” google_plus=“true” linkedin=“true” pinterest=“true” reddit=“true” email=“true”]’);
}
add_action(‘x_before_the_excerpt_end’, ‘x_add_social_sharing’);

The code above will add the shortcode after the excerpts. If you want to also add the shortcode in single posts, you can have this:

function x_add_social_sharing() {
        echo do_shortcode('[x_share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true" email="true"]');
}
add_action('x_before_the_excerpt_end', 'x_add_social_sharing');
add_action('x_before_the_content_end', 'x_add_social_sharing');

We would loved to know if this has work for you. Thank you.

RueNel

Thank you so much. It worked like a charm, YOU ROCK! thanks again.

You’re most welcome :slight_smile:

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