Insert buttons to share posts in Wordpress

0

I need to insert buttons in the posts' footers so that it is shared by whatsapp and social networks, I already installed several Plugins but they did not meet my need, or there is a way to use the links contained in the static pages and in the header that do you already have the social networking buttons used in the theme?

    
asked by anonymous 29.12.2016 / 14:40

2 answers

1

There are some plugins that do this in a simple way. I do not know exactly what social networks you want to share, but based on what you said, I can name a few plugins with a larger number of users.

Anything, you can find some more plugins in this listing .

Another possibility is to use the sharing button scheme provided by JetPack (if you already use it).

    
02.01.2017 / 12:43
1

Hello, I already used plugins for this but the best solution I found was to do it in the 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 have helped!

    
03.01.2017 / 12:03