1

I am trying to add more sharing button to my wordpress blog. here is what it was in origin:

<div class="sharing">
    <div class="sharing-facebook">
        <a data-shareto="<?php _e('Facebook', 'jeg_textdomain') ?>" rel="nofollow" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo wp_get_shortlink() ?>"><i class="fa fa-facebook"></i></a>
    </div>
    <div class="sharing-twitter">
        <a data-shareto="<?php _e('Twitter', 'jeg_textdomain') ?>" rel="nofollow" target="_blank" href="https://twitter.com/home?status=<?php echo urlencode( get_the_title() ); ?>%20-%20<?php echo wp_get_shortlink() ?>"><i class="fa fa-twitter"></i></a>
    </div>
    <div class="sharing-pinterest">
        <a data-shareto="<?php _e('Pinterest', 'jeg_textdomain') ?>" rel="nofollow" target="_blank" href="#" data-href="https://pinterest.com/pin/create/button/?url=<?php echo wp_get_shortlink() ?>&amp;media=<?php echo esc_url( $featured_img ); ?>&amp;description=<?php echo urlencode( get_the_title() ); ?>"><i class="fa fa-pinterest"></i></a>
    </div>
    <div class="sharing-linkedin">
        <a data-shareto="<?php _e('Linkedin', 'jeg_textdomain') ?>" rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo wp_get_shortlink() ?>&amp;title=<?php echo urlencode( get_the_title() ) ?>&amp;summary=<?php echo urlencode( wp_strip_all_tags( get_the_excerpt() )) ?>&amp;source=<?php echo urlencode( get_bloginfo( 'name' ) ) ?>"><i class="fa fa-linkedin"></i></a>
    </div>
</div>

Could you please tell me what should I do to add the sharing option on Reddit and Tumblr?

Thank you very much for helping me.

btw, I am using theme "Falive" but they don't offer the support option to optimize the appearance. I tried to duplicate code lines of other classes but nothing worked.

HoldOffHunger
  • 18,769
  • 10
  • 104
  • 133
Jinzl
  • 11
  • 1
  • You can use add to any plugin from WordPress to add social icons as much as you want. You can download it from https://wordpress.org/plugins/add-to-any/ – Brijesh Dhanani Dec 07 '19 at 05:15

2 Answers2

0

i have edited your code and added reddit & tumblr share , hope it helps.

<div class="sharing">
    <div class="sharing-facebook">
        <a data-shareto="<?php _e('Facebook', 'jeg_textdomain') ?>" rel="nofollow" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo wp_get_shortlink() ?>"><i class="fa fa-facebook"></i></a>
    </div>
    <div class="sharing-twitter">
        <a data-shareto="<?php _e('Twitter', 'jeg_textdomain') ?>" rel="nofollow" target="_blank" href="https://twitter.com/home?status=<?php echo urlencode( get_the_title() ); ?>%20-%20<?php echo wp_get_shortlink() ?>"><i class="fa fa-twitter"></i></a>
    </div>
    <div class="sharing-pinterest">
        <a data-shareto="<?php _e('Pinterest', 'jeg_textdomain') ?>" rel="nofollow" target="_blank" href="#" data-href="https://pinterest.com/pin/create/button/?url=<?php echo wp_get_shortlink() ?>&amp;media=<?php echo esc_url( $featured_img ); ?>&amp;description=<?php echo urlencode( get_the_title() ); ?>"><i class="fa fa-pinterest"></i></a>
    </div>
    <div class="sharing-linkedin">
        <a data-shareto="<?php _e('Linkedin', 'jeg_textdomain') ?>" rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo wp_get_shortlink() ?>&amp;title=<?php echo urlencode( get_the_title() ) ?>&amp;summary=<?php echo urlencode( wp_strip_all_tags( get_the_excerpt() )) ?>&amp;source=<?php echo urlencode( get_bloginfo( 'name' ) ) ?>"><i class="fa fa-linkedin"></i></a>
    </div>
    <div class="sharing-tumblr">
        <a data-shareto="tumblr" rel="nofollow" target="_blank" href="http://www.tumblr.com/share/link?url=<?php echo wp_get_shortlink() ?>"><i class="fab fa- tumblr"></i></a>
    </div>
    <div class="sharing-reddit">
        <a data-shareto="reddit" rel="nofollow" target="_blank" href="https://www.reddit.com/r/test/submit?title=<?php echo the_title() ?>&url=<?php echo wp_get_shortlink() ?>"><i class="fab fa-reddit"></i></a>
    </div>
</div>
Saeed Jamali
  • 1,195
  • 2
  • 7
  • 19
0

you can use AddtoAny plugin for wordpress website

hashem sheikhypour
  • 908
  • 12
  • 30