WordPress.org

Support

Support » Plugins and Hacks » Jetpack by WordPress.com » [Resolved] Manually inserting share buttons

[Resolved] Manually inserting share buttons

  • 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?

    Thanks!

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Jeremy Herve

    @jeherve

    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:
    http://wordpress.org/extend/plugins/jetpack-sharing-butttons-shortcode/

    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' );

    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..

    Plugin Author Jeremy Herve

    @jeherve

    If the code doesn’t work when adding it to your theme, could you remove it, and try installing this small plugin instead?
    http://i.wpne.ws/OOCN

    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.

    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..

    Plugin Author Jeremy Herve

    @jeherve

    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:
    Contact

    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.

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

    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?

    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.

    See my problem:

    saude.ajudese.com.br

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

    esmi

    @esmi

    Forum Moderator

    As per the Forum Welcome, please post your own topics.
    http://wordpress.org/support/plugin/jetpack

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] Manually inserting share buttons’ is closed to new replies.
Skip to toolbar