Adding Jetpack buttons Above/below post – Convert code to html5

Community Forums Forums Design Tips and Tricks Adding Jetpack buttons Above/below post – Convert code to html5

This topic is: resolved

Tagged: , ,

This topic contains 2 replies, has 2 voices, and was last updated by  lemonandolives 6 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #95305

    lemonandolives
    Participant
    Post count: 19

    Found code below on the genesis site: http://my.studiopress.com/tutorials/jetpack-sharing-buttons/

    However, my site runs html5 and this isn’t working. I’m not too savvy, what do I need to change to convert it to html5 so it will work?

    Thanks!!

    //* Add Jetpack share buttons above post
    remove_filter( ‘the_content’, ‘sharing_display’, 19 );
    remove_filter( ‘the_excerpt’, ‘sharing_display’, 19 );

    add_filter( ‘the_content’, ‘sp_share_buttons_above_post’, 19 );
    add_filter( ‘the_excerpt’, ‘sp_share_buttons_above_post’, 19 );

    function sp_share_buttons_above_post( $content = ” ) {
    if ( function_exists( ‘sharing_display’ ) ) {
    return sharing_display() . $content;
    }
    else {
    return $content;
    }
    }

    #95313

    braddalton
    Participant
    Post count: 9784

    Where did you paste the code?

    I’ve never found any SP code to not work.

    Please copy ALL the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++

    https://gist.github.com/studiopress/5750621


    #95335

    lemonandolives
    Participant
    Post count: 19

    I must have been doing it wrong..

    I followed your instruction and it woked!

    Thanks, Brad!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.