Como tendría que poner el codigo?

  • Autor Autor Sousa
  • Fecha de inicio Fecha de inicio
S

Sousa

Gamma
Verificación en dos pasos activada
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Hola a todos!

Quería poner un texto fijo en todas las entradas de mi wordpress.

Encontré por la red el siguiente codigo para ponerlo en el fuctions.php

Insertar CODE, HTML o PHP:
function insertaNotaFinal($content) {
        if(!is_feed() && !is_home()) {
                $content.= "<div class='nota'>";
                $content.= "<h4>¿Te gustó este artículo?</h4>";
                $content.= "<p>Suscríbete a nuestro  <a href='http://feedproxy.google.com/AyudaWordPress'>RSS feed</a> y no te perderás ninguno.</p>";
                $content.= "</div>";
        }
        return $content;
}
add_filter ('the_content', 'insertaNotaFinal');

Y como no tengo ni idea de php, llevo toda la tarde intentando meter este codigo(hmtl)

HTML:
<h4 style="text-align: center;">Para descargar los libros necesitas un cliente Torrent como:
<a href="http://www.bittorrent.com/" target="_blank">BitTorrent</a> <a href="http://www.utorrent.com/" target="_blank">uTorrent</a></h4>
<h4 style="text-align: center;">También puedes utilizar alguno de estos servicios web:
<a href="http://www.zbigz.com/" target="_blank">zbigz.com</a> <a href="https://put.io/" target="_blank">put.io</a> <a href="https://filestream.me" target="_blank">filestream.me</a></h4>
<h5 style="text-align: center;">Copia el magnet link con el botón derecho y pégalo donde corresponda.</h5>
 
Lo que tienes que hacer es usar comilla simpre en lugar de doble.

Saludos!!
 
Enviame un MP y yo te ayudo a colorcar el texto/codigo.
 
Prueba con esto:

Insertar CODE, HTML o PHP:
function insertaNotaFinal($content) {
        if(!is_feed() && !is_home()) {
                $content.= "<h4 style='text-align: center;'>Para descargar los libros necesitas un cliente Torrent como:";
                $content.= "<a href='http://www.bittorrent.com/' target='_blank'>BitTorrent</a> <a href='http://www.utorrent.com/' target='_blank'>uTorrent</a></h4>";
                $content.= "<h4 style='text-align: center;'>También puedes utilizar alguno de estos servicios web:";
                $content.= "<a href='http://www.zbigz.com/' target='_blank'>zbigz.com</a> <a href='https://put.io/' target='_blank'>put.io</a> <a href='https://filestream.me' target='_blank'>filestream.me</a></h4>";
                $content.= "<h5 style='text-align: center;'>Copia el magnet link con el botón derecho y pégalo donde corresponda.</h5>";
        }
        return $content;
}
add_filter ('the_content', 'insertaNotaFinal');
 
Prueba con esto:

Insertar CODE, HTML o PHP:
function insertaNotaFinal($content) {
        if(!is_feed() && !is_home()) {
                $content.= "<h4 style='text-align: center;'>Para descargar los libros necesitas un cliente Torrent como:";
                $content.= "<a rel='nofollow' href='http://www.bittorrent.com/' target='_blank'>BitTorrent</a> <a rel='nofollow' href='http://www.utorrent.com/' target='_blank'>uTorrent</a></h4>";
                $content.= "<h4 style='text-align: center;'>También puedes utilizar alguno de estos servicios web:";
                $content.= "<a rel='nofollow' href='http://www.zbigz.com/' target='_blank'>zbigz.com</a> <a rel='nofollow' href='https://put.io/' target='_blank'>put.io</a> <a rel='nofollow' href='https://filestream.me' target='_blank'>filestream.me</a></h4>";
                $content.= "<h5 style='text-align: center;'>Copia el magnet link con el botón derecho y pégalo donde corresponda.</h5>";
        }
        return $content;
}
add_filter ('the_content', 'insertaNotaFinal');

Me sirvio.

Muchimas gracias!!!!
 
Atrás
Arriba