Hacer botones sociales sin plugins, alguien sabe como ?

  • Autor Autor Caffa
  • Fecha de inicio Fecha de inicio
Caffa

Caffa

Delta
Social Media
Verificación en dos pasos activada
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de 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 !
 
Podiras usarlos asi:

Insertar CODE, HTML o 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>

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

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

Insertar CODE, HTML o 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:

Insertar CODE, HTML o 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>

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

Insertar CODE, HTML o 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>

Insertar CODE, HTML o 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.
 
Atrás
Arriba