I am creating a website using the Candidate theme in wordpress.
There are a number of posts in my website. My home page is set to show the most recent five posts in it.
I have used a plugin named as ‘Share This’ to show the share buttons for facebook, twitter and google+ just above the contents of my posts. The buttons got displayed above the contents of the posts. Now the problem arose when the buttons got displayed in my home page too where the recent posts along with a short summary is displayed.
This started looking quite mess. I tried a lot to remove these but couldn’t.

While researching for this, in some wordpress support forums, i found that the following codes may work

remove_filter( 'get_the_excerpt', 'st_remove_st_add_link', 9 );
remove_filter( 'the_excerpt', 'st_add_widget' );

This did no chage. And I used the following code too

function remove_sharethis() {
if ( ! is_singular( array( 'post', 'page' ) ) ) {
    remove_filter('the_content', 'st_add_widget');
    remove_filter('the_excerpt', 'st_add_widget');
    remove_action('wp_head', 'st_widget_head');
}
}
add_action( 'template_redirect', 'remove_sharethis' );

Is there any way to do so??
I need help desperately.

And even the buttons are not seen completely. They are seen cut-off.

And there is one more problem in this. If I try sharing the posts through facebook share button of this plugin, the contents of the posts donot load at the share screen. Rather it just shows the website’s name.

Please help me if there is someone who has better knowledge in this sort of problems and this plugin.

Read more here: Avoid displaying the share buttons in the post contained in my home page


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , , , ,

Wordpress related questions and answers: