Support » Theme: Basic » Remove certain social share icons and keep others.

  • Resolved Deranged_Dev

    (@deranged_dev)


    As my site is targeted towards english language readers, I don’t feel much use for the Russian social share icons like: vkontakte.ru and odnoklassniki.ru.

    But I would like to keep the facebook, google+ and twitter icons.
    Please help.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Please follow below instruction:

    1. Login as admin and click on ‘Customize’.
    screenshot->
    2. Then go to Custom Code and put below css code into Custom CSS Box.

    .ya-share2__list_direction_horizontal > .ya-share2__item_service_vkontakte, .ya-share2__item_service_odnoklassniki {
    display:none !important;
    }

    screenshot:
    screenshot:

    Hope it will work for you.

    Theme Author WP Puzzle

    (@wppuzzle)

    Hello!
    If you want to keep only facebook, google + and twitter share buttons, you need to install and activate Basic child theme and add the following function to functions.php file of child theme:

    function basic_social_buttons( $old_soc_html ) {

    $soc_html = “<div class=’social_share clearfix’>”;

    $link = get_permalink();

    $title = get_the_title();

    $soc_html .= ‘




    ‘;

    ‘;

    $soc_html .= “</div>”;

    return $soc_html;
    }
    add_filter( ‘basic_social_share’, ‘basic_social_buttons’ );

    Or add this code to plugin FunctionsPHP.

    • This reply was modified 2 years, 11 months ago by  WP Puzzle.
    • This reply was modified 2 years, 11 months ago by  WP Puzzle.
    Theme Author WP Puzzle

    (@wppuzzle)

    Hello!
    If you want to keep only facebook, google + and twitter share buttons, you need to install and activate

    Basic child theme and add the following function to functions.php file of child theme:

    function basic_social_buttons( $old_soc_html ) {
    $soc_html = “<div class=’social_share clearfix’>”;
    $link = get_permalink();
    $title = get_the_title();`
    $soc_html .= ‘
    `


    ‘;

    $soc_html .= “</div>”;`

    return $soc_html;
    }
    add_filter( ‘basic_social_share’, ‘basic_social_buttons’ );

    Or add this code to plugin FunctionsPHP.

    • This reply was modified 2 years, 11 months ago by  WP Puzzle.
    • This reply was modified 2 years, 11 months ago by  WP Puzzle.
    Theme Author WP Puzzle

    (@wppuzzle)

    `
    function basic_social_buttons( $old_soc_html ) {
    $soc_html = “<div class=’social_share clearfix’>”;
    $link = get_permalink();
    $title = get_the_title();
    $soc_html .= ‘
    <a rel=”nofollow” class=”psb fb” target=”_blank” href=”http://www.facebook.com/sharer.php?u=’ . $link . ‘&t=’ . urlencode( $title ) . ‘&src=sp” title=”‘ . __( ‘Share in’, ‘basic’ ) . ‘ Facebook”></a>
    <a rel=”nofollow” class=”psb gp” target=”_blank” href=”https://plus.google.com/share?url=’ . $link . ‘” title=”‘ . __( ‘Share in’, ‘basic’ ) . ‘ Google+”></a>
    <a rel=”nofollow” class=”psb tw” target=”_blank” href=”http://twitter.com/share?url=’ . $link . ‘&text=’ . urlencode( $title ) . ‘” title=”‘ . __( ‘Share in’, ‘basic’ ) . ‘ Twitter”></a>
    ‘;

    $soc_html .= “</div>”;

    return $soc_html;
    }
    add_filter( ‘basic_social_share’, ‘basic_social_buttons’ );
    `

    Sorry, I’m confused. The first solution did not work. I add the provided code in the custom codes settings but nothing changed.

    For the second solution, I don’t know how to install and activate Basic Child theme?

    Or add this code to plugin FunctionsPHP.

    I can’t find this plugin.
    Help.

    • This reply was modified 2 years, 11 months ago by  Deranged_Dev.
    Theme Author WP Puzzle

    (@wppuzzle)

    You can download Basic child theme following this link http://wp-puzzle.com/docs/basic/where-to-get-a-child-theme.html
    And you can download plugin FunctionsPHP following this link http://en.wp-puzzle.com/functionsphp/

    Thank you for the help. I tried the method with installing FunctionsPHP plugin. And pasted the code provided by you. It gave me the following error:

    http://prntscr.com/d7q8gv

    Theme Author WP Puzzle

    (@wppuzzle)

    Hello!
    Try add this snippet to plugin FunctionsPHP:

    
    function social_buttons( $old_soc_html ) {
    
        $soc_html  = "<div class='social_share clearfix'>";
        $link  = get_permalink();
        $title = get_the_title();
    
        $soc_html .= '
    
    <a rel="nofollow" target="_blank" href="http://www.facebook.com/sharer.php?u=' . $link . '&t=' . urlencode( $title ) . '&src=sp" title="' . __( 'Share in', 'basic' ) . ' Facebook"></a>
    
    <a rel="nofollow" target="_blank" href="https://plus.google.com/share?url=' . $link . '"  title="' . __( 'Share in', 'basic' ) . ' Google+"></a>
    
    <a rel="nofollow" target="_blank" href="http://twitter.com/share?url=' . $link . '&text=' . urlencode( $title ) . '" title="' . __( 'Share in', 'basic' ) . ' Twitter"></a>
    
    ';
        $soc_html .= "</div>";
    
        return $soc_html;
    }
    
    add_filter( 'basic_social_share', 'social_buttons' );
    
    Theme Author WP Puzzle

    (@wppuzzle)

    Oh, sorry. It is problem with code formatting. Try copy and paste again

    
    function social_buttons( $old_soc_html ) {
    
        $soc_html  = "<div class='social_share clearfix'>";
    
        $link  = get_permalink();
        $title = get_the_title();
    
        $soc_html .= '
    
    <a rel="nofollow" target="_blank" href="http://www.facebook.com/sharer.php?u=' . $link . '&t=' . urlencode( $title ) . '&src=sp" title="' . __( 'Share in', 'basic' ) . ' Facebook"></a>
    
    <a rel="nofollow" target="_blank" href="https://plus.google.com/share?url=' . $link . '"  title="' . __( 'Share in', 'basic' ) . ' Google+"></a>
    
    <a rel="nofollow" target="_blank" href="http://twitter.com/share?url=' . $link . '&text=' . urlencode( $title ) . '" title="' . __( 'Share in', 'basic' ) . ' Twitter"></a>
    
    ';
        $soc_html .= "</div>";
    
        return $soc_html;
    }
    
    add_filter( 'basic_social_share', 'social_buttons' );
    

    Hi thank you again. Sorry for being such a novice about this. But I added the code and now all social share icons are gone 🙁

    My website: http://www.securityguybob.com/

    • This reply was modified 2 years, 11 months ago by  Deranged_Dev.
    Theme Author WP Puzzle

    (@wppuzzle)

    Sorry again! Code for social share icons worked out but CSS classes disappeared. Try to copy and insert function again!

    
    function social_buttons( $old_soc_html ) {
    
        $soc_html  = "<div class='social_share clearfix'>";
    
        $link  = get_permalink();
        $title = get_the_title();
    
        $soc_html .= '
    			<a rel="nofollow" class="psb fb" target="_blank" href="http://www.facebook.com/sharer.php?u=' . $link . '&t=' . urlencode( $title ) . '&src=sp" title="' . __( 'Share in', 'basic' ) . ' Facebook"></a>
    			<a rel="nofollow" class="psb gp" target="_blank" href="https://plus.google.com/share?url=' . $link . '"  title="' . __( 'Share in', 'basic' ) . ' Google+"></a>
    			<a rel="nofollow" class="psb tw" target="_blank" href="http://twitter.com/share?url=' . $link . '&text=' . urlencode( $title ) . '" title="' . __( 'Share in', 'basic' ) . ' Twitter"></a>
    	';
        $soc_html .= "</div>";
    
        return $soc_html;
    }
    
    add_filter( 'basic_social_share', 'social_buttons' );
    

    wow. Thank you so much, it worked!

    Theme Author WP Puzzle

    (@wppuzzle)

    We were glad to help!

    Such a beautiful theme and layout but the coding and to make simple edits like remove Russian social media is horrendous!
    Man, why not just make it an easier way to edit social media icons and make simple edits?
    Not very user friendly at all unless your a programmer.

    Theme Author WP Puzzle

    (@wppuzzle)

    Hello!
    Thanks for your suggestion, we really appreciate it!
    Notification of this issue has been added to the task list of Basic theme and will be fixed in an update.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Remove certain social share icons and keep others.’ is closed to new replies.