Vanilla 1.1.10 es un producto de Lussumo. Para más información: Documentación, Soporte.
// Compartir
function compartir($content){
if(!is_feed() && !is_home()) {
$content .= '<div class="compartir">
<iframe
src="http://www.facebook.com/plugins/like.php?href='.
urlencode(get_permalink($post->ID))
.'&layout=button_count&show_faces=false&width=200&action=like&colorscheme=light&height=21"
scrolling="no" frameborder="0" style="border:none;
overflow:hidden; width:120px; height:21px;"
allowTransparency="true"></iframe>
<a title="Enviar a Twitter" href="http://twitter.com/share"
class="twitter-share-button"
data-count="horizontal">reTwitt</a>
<script type="text/javascript"
src="http://platform.twitter.com/widgets.js"></script>
<div class="g-plusone" data-size="medium"></div>
</div>';
}
return $content;
}
add_action('the_content', 'compartir');
Posted By: lbarcelo1- Con ese codigo, tambien se me muestra en las paginas, ¿como lo limito solo a los posts?
Posted By: lbarcelo2- Necesito meter el codigo<?php echo do_shortcode('[pinit]'); ?>dentro del "div class compartir" para meter un boton de Pinterest, si lo pego a lo bestia como que no funciona, ¿como se haría?
Posted By: lbarceloPero lo segundo no, me gustaría meterlo el ultimo boton, bajo el de google plus ( ), seguramente no este poniendo el codigo correctamente
// Compartir
function compartir($content){
if(!is_feed() && !is_home() && !is_page()) {
$content .= '<div class="compartir">
<iframe
src="http://www.facebook.com/plugins/like.php?href='.
urlencode(get_permalink($post->ID))
.'&layout=button_count&show_faces=false&width=200&action=like&colorscheme=light&height=21"
scrolling="no" frameborder="0" style="border:none;
overflow:hidden; width:120px; height:21px;"
allowTransparency="true"></iframe>
<a title="Enviar a Twitter" href="http://twitter.com/share"
class="twitter-share-button"
data-count="horizontal">reTwitt</a>
<script type="text/javascript"
src="http://platform.twitter.com/widgets.js"></script>
<div class="g-plusone" data-size="medium"></div>'.do_shortcode('[pinit]').
'</div>';
}
return $content;
}
add_action('the_content', 'compartir');
Posted By: lbarcelono entiendo nada de lo que he puesto pero ahora si que funciona
1 a 6 de 6