Title: Where to insert code
Last modified: August 21, 2016

---

# Where to insert code

 *  Resolved [cbridges](https://wordpress.org/support/users/cbridges/)
 * (@cbridges)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/where-to-insert-code-2/)
 * 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.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/magazine-basic/3.0.8/screenshot.
   png)
 * Magazine Basic
 * [Support Threads](https://wordpress.org/support/theme/magazine-basic/)
 * [Active Topics](https://wordpress.org/support/theme/magazine-basic/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/magazine-basic/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/magazine-basic/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [cbridges](https://wordpress.org/support/users/cbridges/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/where-to-insert-code-2/)
 * Status: resolved