Support » Fixing WordPress » Sharing button at the top of the post

  • Resolved Demir

    (@sdarthenos)


    Hello,

    I use the sharing buttons on articles in my blog without using any plugin. I manage in the “Sharing” section of the left menu. The sharing buttons are always displayed at the bottom of my articles, I also want to display at the top of my article as well. Most of the time, my followers can not see this buttons, I understand it from the interpretation of many users.

    How can I do this without using an additional plugin.

    Thanks in advance for your help.
    Regards.

    • This topic was modified 12 months ago by Demir.
    • This topic was modified 12 months ago by Demir.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello

    Maybe below reference link might help.

    https://jetpack.com/2013/06/10/moving-sharing-icons/

    Thanks.

    Demir

    (@sdarthenos)

    Hello again,

    Excuse my ignorance!

    When I add the following code to the functions.php file, the share buttons in the articles will be removed:

    function jptweak_remove_share() {
    remove_filter( ‘the_content’, ‘sharing_display’, 19 );
    remove_filter( ‘the_excerpt’, ‘sharing_display’, 19 );
    if ( class_exists( ‘Jetpack_Likes’ ) ) {
    remove_filter( ‘the_content’, array( Jetpack_Likes::init(), ‘post_likes’ ), 30, 1 );
    }
    }

    add_action( ‘loop_start’, ‘jptweak_remove_share’ );

    In order to see the sharing buttons at the beginning and the end of the articles, which files should I add the codes belove to the file and where?

    if ( function_exists( ‘sharing_display’ ) ) {
    sharing_display( ”, true );
    }

    if ( class_exists( ‘Jetpack_Likes’ ) ) {
    $custom_likes = new Jetpack_Likes;
    echo $custom_likes->post_likes( ” );

    Thank you!

    Depends on how your theme is built. I strongly recommend that you read Theme Development and Template Hierarchy

    Based on your comment, I would start with: single.php, index.php and comments.php

    Demir

    (@sdarthenos)

    The WordPress team should find a way to do this without changing any code. Because many users like me do not know how to write code. That’s the main reason I chose WordPress infrastructure. I’ve never regretted this decision.

    I don’t want to make my system unusable by making a mistake, so I gave up this change.

    Thank you for your valuable help.
    Regards.

    Hello sdarthenos,

    I understand your concern here, but as your initial requirement was to do this without any use of plugin or major change, this was a reference link I found for you.

    It becomes easy when you use some Plugin as they do provide some extended features.

    Rest you never know there might be already some option available, but it is just I need to dig a bit to find if there is default way or not.

    In case I find any I will keep you posted.

    Feel free to ask if you have any further question or you can mark this as resolved.

    Thanks.

    Demir

    (@sdarthenos)

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sharing button at the top of the post’ is closed to new replies.