Insert buttons to share posts in Wordpress

Asked

Viewed 597 times

0

I need to insert buttons in the footers of the posts so that it is shared by social networks and Whatsapp, I have installed several plugins but not met my need, or there is a way to use the links contained in the static pages and in the header that in turn already have the buttons of the social networks used in the theme?

  • Your question is solved with plugins, but you say it does not work. Can you give more details? Plugins work am with another theme?

  • Hello, What plugins have you tested? Tried Addthis? Cumps,

2 answers

1


  • now I added the plugin Addtoany and worked perfectly including for Whatsapp, it may be some incompatibility of the theme with the other plugins. Thank you @Hamurabiaraujo

  • I’m glad I helped. As this answer was useful to you in solving the problem, mark it as correct. It will help in solving similar problems of other people ;)

1

Hello, I’ve used plugins for this but the best solution I found was to do by hand, it is lighter and simpler to customize. $GLOBALS['url'] = "url of your template";

<div id="compartilhamento">
                        <ul>
                            <li>
                                <a href="whatsapp://send?text=<?php the_permalink() ?>"><img src="<?php echo $GLOBALS['url']; ?>/images/whatsapp.png"></a>
                            </li>
                            <li>
                                <a href="http://facebook.com/share.php?u=<?php the_permalink() ?>&amp;t=<?php echo urlencode(the_title('','', false)) ?>" target="_blank" title="Compartilhar <?php the_title();?> no Facebook"><img src="<?php echo $GLOBALS['url']; ?>/images/facebook.png"></a>
                            </li>
                            <li>
                            <a href="http://twitter.com/intent/tweet?text=<?php the_title();?>&url=<?php the_permalink();?>&via=seutwitter" title="Twittar sobre <?php the_title();?>" target="_blank"><img src="<?php echo $GLOBALS['url']; ?>/images/twitter.png"></a>
                            </li>
                            <li>
                                <a href="https://plus.google.com/share?url=<?php the_permalink();?>" target="_blank"><img src="<?php echo $GLOBALS['url']; ?>/images/google-plus.png"></a>
                            </li>
                            <li>
                                <a href="https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink();?>&title=<?php the_title();?>" target="_blank"><img src="<?php echo $GLOBALS['url']; ?>/images/linkedin.png"></a>
                            </li>
                            <!-- <li>
                                <a href="#"><img src="<?php //echo $GLOBALS['url']; ?>/images/pinterest.png"></a>
                            </li> -->
                            <li>
                            <a target="_blank" class="email" title="Compartilhe por Email" href="mailto:?Subject=<?php the_title();?>&amp;Body=http%3A%2F%2Fwptotal.com.br%2Fcomo-adicionar-botao-de-compartilhamento-no-seu-blog%2F"></a>
                                <a href="mailto:?Subject=<?php the_title();?>&amp;Body=<?php the_permalink();?>" target="_blank"><img src="<?php echo $GLOBALS['url']; ?>/images/mail.png"></a>
                            </li>
                            <li>
                                <a href="javascript:window.print()"><img src="<?php echo $GLOBALS['url']; ?>/images/print.png"></a>
                            </li>
                        </ul>
                    </div>

I hope I’ve helped!

  • I liked your idea and my way will be this, but as I was urgently ended up using the plugin Addtoany that met my need, thanks.

  • good evening all right, I used the plugin Addtoany at first worked but the Whatsapp button does not work in the browser have any idea? I already installed the desktop application even then the same is not started.

  • Actually, in the browser it fails to identify the desktop app installed, I still could not resolve this tbm.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.