• Hello. Great theme, and thank you for the support.

    I am attempting to insert sharing icons (produced by the Jetpack plugin) onto each page. By default they are displayed at the bottom of each page, but the devs have written instructions on how to insert them anywhere on the page (https://jetpack.me/2013/06/10/moving-sharing-icons/). Specifically, one has to insert some PHP code somewhere:

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

    (there is also code to be inserted into functions.php, but that is straightforward) This code must be inserted, “…in the area you want the Sharing or Likes buttons to appear.” But I’m not sure exactly where this should be inserted. Again, I would like to insert these icons on each page, on the same line as my page title, and right aligned. So in what file(s) should I include this code, and where exactly?

    Thanks in advance.

    PS: There is also a method to carry this out using jQuery, but that is a little beyond my expertise.

  • The topic ‘Where to insert PHP code for sharing icons’ is closed to new replies.