Ready to get started?Download WordPress


Jetpack by WordPress.com
[resolved] [closed] Manually inserting share buttons (13 posts)

  1. lowlight
    Posted 1 year ago #

    Looking at the "Sharing" settings, we can apparently insert it anywhere we want, as opposed to manually inserting it below the content:

    Advanced. If this option is checked, you must include these files in your theme manually for the sharing links to work.

    However, I can't find the actual code anywhere.

    What is the code to insert the sharing buttons?



  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    This option allows you to insert your own CSS and JS files for each sharing button, but won't change their placement on your posts/pages.

    If you want to add sharing buttons somewhere else in your template files, you can insert the following code somewhere in the Loop:

    <?php echo sharing_display(); ?>

    Another solution would be to use a shortcode to insert the buttons manually, post by post. You can use this plugin to do so:

    If you want to remove the existing buttons from the bottom of your posts, you can add the following function in a new plugin, or in 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' );
  3. ilmattiapascal
    Posted 1 year ago #

    the echo stuff works perfectly...but now i ve got two identical share areas.

    I pasted the remove recipe in function.php but it doesn't work..

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    If the code doesn't work when adding it to your theme, could you remove it, and try installing this small plugin instead?

  5. ilmattiapascal
    Posted 1 year ago #

    hey jeremy, thank you for your work with the small plugin; i tested it but nothing changed...i work with win 7, i m making a child (or better, a young frankenstein) theme of 2012, i ve got no other plugin installed than your nearly perfect jetpack.

    I tried others plugin with share stuff, but i would prefer your. If you could solve this problem, it would be really perfect.

  6. ilmattiapascal
    Posted 1 year ago #

    normally i put <?php echo sharing_display(); ?> in my content.php .
    it works well because it is exactly where i want (at the bottom of the article, under the post date and leave a comment.
    the problem is that the default ketpack plugin is above the date+leave a comment.

    i could change it with dreamweaver but then i m afraid to have problem with some position elements..

  7. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Could you post your site URL here, so we can have a look?

    If you want it to remain private, you can also contact us via this contact form:

  8. ilmattiapascal
    Posted 1 year ago #

    i would like to give you a URL but sadly i m working in a localhost, soon i ll publish the site, but i m still building..:( maybe if u need some specific templates of mine, i can give u without problems.

  9. Jauhari
    Posted 1 year ago #

    How About New Features LIKE BOXES? How To Remove and add it manually?

  10. heytricia
    Posted 10 months ago #

    The function shown above worked until today - when I updated my jetpack plugin. I'd much rather place the buttons manually. Is there a new tweak that will make the function work again?

  11. igneous
    Posted 10 months ago #

    Would love to be able to do this as well. It's the only reason I dont use the share buttons, because I want to have control over their placement.

  12. cm.contato
    Posted 10 months ago #

    See my problem:


    If you try to share a window will open and only one loop to the same page.

  13. esmi
    Forum Moderator
    Posted 9 months ago #

    As per the Forum Welcome, please post your own topics.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic