WordPress.org

Ready to get started?Download WordPress

Forums

Magazine Basic
[resolved] Where to insert code (1 post)

  1. cbridges
    Member
    Posted 8 months ago #

    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

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.