Tutorial: Compartir post en Wordpress con URL acortada sin plugins

  • Autor Autor eic2010
  • Fecha de inicio Fecha de inicio
E

eic2010

Beta
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Hola amigos este es mi primer tutorial que voy a redactar espero que les sirva.

Bueno he descubierto una forma muy sencilla de compartir nuestro post acortarlo la url sin plugins y sin ninguna web sino solo con wordpress!!! EJEMPLO: tuweb.com/como-acortar-automaticamente-la-url-al-compartir-nuestro-post-en-redes-sociales a que muestre cuando compartimos en las redes sociales EJEMPLO: tuweb.com//?p=232 (refiriendose al post publicado numero 232)

solamente hay que agregarle ejemplo twitter twitter.com/share?url=http://tuweb/?p=<?php the_ID(); ?> y asi con los demas botones de compartir en redes sociales aca les dejo un ejemplo de todos los botones.


HTML:
<div class='compartir'>
			<p align="center"><a href="https://twitter.com/share?url=http://tuweb/?p=<?php the_ID(); ?>&text=<?php the_title_attribute(); ?>"  target="_blank" onclick="window.open(this.href, this.target, 'menubar=no, toolbar=no, resizable=yes, scrollbars=yes, top=100 ,width=650 ,height=550, left=300'); return false;"><img alt="Twitter" src="http://tuweb/wp-content/uploads/icotwit.png" width="24" height="24" >
</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="window.open(
    'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href), 
    'facebook-share-dialog', 
    'top=100 ,width=650 ,height=550, left=300'); 
    return false;"><img  src="http://tuweb/wp-content/uploads/icofaceb.png" width="24" height="24">
</a>&nbsp;&nbsp;&nbsp;<a href="https://plus.google.com/share?url=<?php the_permalink(); ?>"  target="_blank" onclick="window.open(this.href, this.target, 'menubar=no, toolbar=no, resizable=yes, scrollbars=yes, top=100 ,width=650 ,height=550, left=300'); return false;">
   <img alt="facee" src="http://tuweb/wp-content/uploads/icogoo.png" width="24" height="24">
</a>&nbsp;&nbsp;&nbsp; <a href="mailto:?subject=Mira esta noticia !!!&amp;body=<?php the_title_attribute(); ?>&nbsp;&nbsp;&nbsp;&nbsp;http://tuweb/?p=<?php the_ID(); ?>" title="Email Sharing"><img  src="http://tuweb/wp-content/uploads/icomail.png" width="24" height="24">
</a>&nbsp;&nbsp;&nbsp;<a  href="whatsapp://send?text=http://tuweb/?p=<?php the_ID(); ?>" data-action="share/whatsapp/share" ><img src="http://tuweb/wp-content/uploads/icowha3.png" width="24" height="24" ></a> </p>
			</div>
 
Última edición:
Gracias k aporte
 
gracias por el aporte
 
Buen aporte me servira
 
Buen aporte, ahora bien, como podría usar lo anterior a modo de integrar botones para compartir personalizados, pero que estos no se me muestren en el resumen del post?
 
Atrás
Arriba