Fazer botões sociais sem plugins, alguém sabe como?

  • Autor Autor Caffa
  • Data de início Data de início
Tradução em andamento: em alguns minutos este tópico estará em português. Por enquanto, o conteúdo está no original em espanhol. Ver original
Caffa

Caffa

Delta
Social Media
Verificación en dos pasos activada
Usuário com poucas negociações! Use sempre o saldo do ForoBeta!
Hola betas, nuevamente molestando. Resulta que no me gusto el aspecto de ningun plugin para colocar botones sociales en mi pagina single.php. Si bien el diseño ya lo tengo hecho, no se que codigos aplicarle, o que referencias darle al <a href=""> para qiue me tome el link de la página automaticamente.

Desde ya muchas gracias !
 
Foi útil? Participe da conversa

Com sua conta grátis você pode responder, mandar mensagem privada ao autor e comprar com Saldo retido: o pagamento é liberado quando você recebe o combinado.

Leva 30 segundos · você volta a este tópico ao terminar
Podiras usarlos asi:

Inserir CODE, HTML ou PHP:
<a href="ttp://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>" target="_blank" rel="nofollow">Compartir en facebook</a>

Inserir CODE, HTML ou PHP:
<a href="http://www.facebook.com/plugins/like.php?href=<?php the_permalink(); ?>" target="_blank" rel="nofollow">Facebook Like</a>

Inserir CODE, HTML ou PHP:
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>&via=@twitteruser" target="_blank" rel="nofollow"> Twittear</a>

Inserir CODE, HTML ou PHP:
<a href="href="https://apis.google.com/_/+1/fastbutton?usegapi=1&size=large&hl=en&url=<?php the_permalink(); ?>" target="_blank" rel="nofollow">Google +1</a>

A los links le agregarias las classes deseadas para darles estilo.

Aqui hay ejemplos para botones para otras redes sociales
 
Podiras usarlos asi:

Inserir CODE, HTML ou PHP:
<a rel="nofollow" href="ttp://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>" target="_blank" rel="nofollow">Compartir en facebook</a>

Inserir CODE, HTML ou PHP:
<a rel="nofollow" href="http://www.facebook.com/plugins/like.php?href=<?php the_permalink(); ?>" target="_blank" rel="nofollow">Facebook Like</a>

Inserir CODE, HTML ou PHP:
<a rel="nofollow" href="http://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>&via=@twitteruser" target="_blank" rel="nofollow"> Twittear</a>

Inserir CODE, HTML ou PHP:
<a href="href="https://apis.google.com/_/+1/fastbutton?usegapi=1&size=large&hl=en&url=<?php the_permalink(); ?>" target="_blank" rel="nofollow">Google +1</a>

A los links le agregarias las classes deseadas para darles estilo.

Aqui hay ejemplos para botones para otras redes sociales

Muchisimas gracias por el tiempo y la explicación ! se agradece
 
yo le haría un ajuste mas al código que te han pasado.

en lugar de usar <?php the_permalink(); ?> deberías usar <?php wp_get_shortlink(); ?>

esto porque algunas veces los links de nuestros sitio tienden a ser un poco largas y como en el caso de twitter estamos limitados por caracteres, así que la mejor opción es usar la URL corta.
 
Voltar
Topo