• Resolved cbridges

    (@cbridges)


    Hi,
    I am using magazine basic theme with a child. I am using JetPack sharing module (one that shows social media like buttons). These by default show up at the bottom of the page. I want to make them show up in the right sidebar. The developer of the jetpack module indicated that I need to add the following code to my template to make them show up in the area I wanted.

    <?php
    if ( function_exists( 'sharing_display' ) ) {
        sharing_display( '', true );
    }
    
    if ( class_exists( 'Jetpack_Likes' ) ) {
        $custom_likes = new Jetpack_Likes;
        echo $custom_likes->post_likes( '' );
    }
    ?>

    My question is which file to I add these to to make them show up in the rights sidebar (sidebar-second.php)?
    and…
    where in the file would I insert this code?

    Just as a note: There is shortcode for this sharing module however using the shortcode in a widget just makes the buttons show up both places (right sidebar and bottom of page) so I need to figure out how to do the above code to make it only show up in sidebar.
    Thanks
    Chris

  • The topic ‘Where to insert code’ is closed to new replies.