WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] [closed] Share buttons position - Above other plugins (17 posts)

  1. mariafernandez
    Member
    Posted 1 year ago #

    I'd like to change the position of my 'Share this' buttons. I want them to appear immediately after a blog post and above other plugins like 'Related posts' and 'Post ender'. How can I do that?

    Thanks.

    http://wordpress.org/extend/plugins/jetpack/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    You can make some changes to your theme to change the placement of the sharing buttons.

    You can find detailed instructions here:
    http://wordpress.org/support/topic/plugin-sharedaddy-how-can-i-change-the-location-of-the-share-buttons?replies=5#post-2508058

  3. mariafernandez
    Member
    Posted 1 year ago #

    I'm afraid I've read the 'instructions' in the link above four times, but I still don't understand what I'm supposed to do. I find it most unclear.

    Can anyone translate those instructions into understandable English?

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Start by adding the following code to your theme's functions.php file:

    function jptweak_remove_share() {
    	remove_filter( 'the_content', 'sharing_display',19 );
    	remove_filter( 'the_excerpt', 'sharing_display',19 );
    }
    add_action( 'loop_end', 'jptweak_remove_share' );

    Then, locate the exact place where you'd like your sharing buttons to appear in your template files, and add the following code:
    <?php echo sharing_display(); ?>

  5. mariafernandez
    Member
    Posted 1 year ago #

    Thanks, Jeremy.

    To avoid having too many elements below each post, I've decided to go for a sharing plugin that puts the buttons on the side, so I won't be needing those fixes.

  6. gerzok
    Member
    Posted 1 year ago #

    wooow Jeremy you're awesome bro, thanks for this!

  7. Nicolas
    Member
    Posted 1 year ago #

    Exactly the answer I was looking for. Great support Jeremy!

  8. Part Time Yeti
    Member
    Posted 11 months ago #

    Thanks! This was exactly the fix I needed. Does anyone know of a similar functions.php fix for the new Jetpack Likes?

  9. xaifu
    Member
    Posted 9 months ago #

    Thanks!
    Very useful information.
    Great support!

  10. ilmattiapascal
    Member
    Posted 9 months ago #

    jeremy aftern some months i'm still not able to make this works. Your function tweak doesn't hide the original sharedaddy share button. At the end i ve always two sharing areas. The first is the original that i want to move under the footer of the content (and above the yarpp), and the other is the correct share area above yarpp and under the footer content.

    you made also a plugin in another post that you asked me to try, but nothing. Now i'm learning a little better CSS and maybe with your help we can find a more drastic solution.

    I was just wondering if i can call the class of the correct share buttons with another name so when i delete the original one, it doesn't delete also the correct one..

    i m always on a child theme of 20 12, i think my templates haven't any complication which could avoid your solution from working great as the rest of your great plugin..

  11. ilmattiapascal
    Member
    Posted 9 months ago #

    ok, so i made it. But, i hope that i didn't destroy something. Anyway it seems working good.

    i just added

    function jptweak_remove_share() {
    	remove_filter( 'the_content', 'sharing_display',19 );
    	remove_filter( 'the_excerpt', 'sharing_display',19 );
    }
    add_action( 'loop_end', 'jptweak_remove_share' );

    at the bottom of the sharing-service.php file removing:

    add_filter( 'the_content', 'sharing_display', 19 );
    add_filter( 'the_excerpt', 'sharing_display', 19 );

    it's possible that in the future it will cause me problems?

  12. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 9 months ago #

    @ilmattiapascal That will work, but your changes will be deleted next time you update the Jetpack plugin.

    My function should work as is, if you paste it to your theme's functions.php file. If it doesn't work, I would need to know your site URL to investigate further.

    Thanks!

  13. lonchbox
    Member
    Posted 9 months ago #

    Thanx Jeremy, it works for me too.

    Could be cool to have a checkbox option in the admin to insert buttons manually or thru a path :)

  14. cyphog
    Member
    Posted 7 months ago #

    Jetpack 2.5 seems to have broken this (for me at least).

    I have the jptweak function in functions.php, but as of the plugin upgrade only removing or commenting out the add_filter in sharing-service.php removes the default placement.

    Any thoughts?

    kimpluscraig.com

  15. lonchbox
    Member
    Posted 7 months ago #

    @cyphog

    Maybe this helps:

    // Remove Jetpack CSS styles
    function remove_jetpack_styles(){
    	//wp_deregister_style('AtD_style'); # After the Deadline
    	//wp_deregister_style('jetpack-carousel'); # Carousel
    	//wp_deregister_style('grunion.css'); # Grunion contact form
    	//wp_deregister_style('the-neverending-homepage'); # Infinite Scroll
    	//wp_deregister_style('infinity-twentyten'); # Infinite Scroll - Twentyten Theme
    	//wp_deregister_style('infinity-twentyeleven'); # Infinite Scroll - Twentyeleven Theme
    	//wp_deregister_style('infinity-twentytwelve'); # Infinite Scroll - Twentytwelve Theme
    	//wp_deregister_style('noticons'); # Notes
    	//wp_deregister_style('post-by-email'); # Post by Email
    	//wp_deregister_style('publicize'); # Publicize
    	wp_deregister_style('sharedaddy'); # Sharedaddy
    	wp_deregister_style('sharing'); # Sharedaddy Sharing
    	//wp_deregister_style('stats_reports_css'); # Stats
    	//wp_deregister_style('jetpack-widgets'); # Widgets
    }
    add_action('wp_print_styles', 'remove_jetpack_styles');

    With this you can remove the css sharedaddy sharebuttons.

    What I canĀ“t find yet is a way to change the markup but using css ise very easy.

  16. Gioxx
    Member
    Posted 6 months ago #

    cyphog same problem here. I have removed lines 607 & 608 in sharing-service.php (and I'm waiting for a new versione of Jetpack)

  17. esmi
    Theme Diva & Forum Moderator
    Posted 6 months ago #

    As per the Forum Welcome, please post your own topics. This one is 8 months old.
    http://wordpress.org/support/plugin/jetpack

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic