How to Add Jetpack Share Buttons to Post Info and Post Meta Areas?

Community Forums Forums Design Tips and Tricks How to Add Jetpack Share Buttons to Post Info and Post Meta Areas?

This topic is: not resolved

This topic contains 2 replies, has 3 voices, and was last updated by  Marco 1 year, 5 months ago.

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

    rbickett
    Participant
    Post count: 2

    I am using the Jetpack Share Buttons on my site. Instead of placing these above and below the content, I’d like to add them to the Post Info and Post Meta Areas within the Epik child theme (I’ll float them to the right via CSS). I am using the Customize the post info function and the Customize the post meta function as well as the Add Jetpack share buttons above post code as shown below. I am curious how I can customize this so that the Jetpack Share Buttons appeear in the Post Info and Post Meta areas?

    `// Customize the post info function
    add_filter( ‘genesis_post_info’, ‘post_info_filter’, ‘sharing_display’, 19 );
    function post_info_filter($post_info) {
    if ( !is_page() ) {
    $post_info = ‘by [post_author_posts_link]‘;
    return $post_info;
    }}`

    `// Customize the post meta function
    add_filter( ‘genesis_post_meta’, ‘post_meta_filter’ );
    function post_meta_filter($post_meta) {
    if ( !is_page() ) {
    $post_meta = ‘[post_categories before="Filed Under: "] [post_tags before="Tagged: "]‘;
    return $post_meta;
    }}`

    `// Add Jetpack share buttons above post
    remove_filter( ‘the_content’, ‘sharing_display’, 19 );
    remove_filter( ‘the_excerpt’, ‘sharing_display’, 19 );
    add_filter( ‘the_content’, ‘share_buttons_above_post’, 19 );
    add_filter( ‘the_excerpt’, ‘share_buttons_above_post’, 19 );
    function share_buttons_above_post( $content = ” ) {
    if ( function_exists( ‘sharing_display’ ) ) {
    return sharing_display() . $content;
    }
    else {
    return $content;
    }
    }`

    • This topic was modified 1 year, 5 months ago by  rbickett.
    • This topic was modified 1 year, 5 months ago by  rbickett.
    http://www.eminencemedia.co
    #42532

    braddalton
    Participant
    Post count: 10355

    Try this http://www.briangardner.com/code/add-share-buttons-above-post/

    I used to use Jetpack share also and used a plugin to display them in the post info position.

    But i found they didn’t work properly and now use Flare.


    #43774

    Marco
    Participant
    Post count: 63
    This reply has been marked as private.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.