Ver Mensaje Individual
  #11 (permalink)  
Antiguo 18/05/2011, 23:26
ixac
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 7 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

No aparece el antetitulo ver aquí: tuentorno.mx/news2/

ESTO ES LO QUE HICE:

1.- Creé un campo personalizado con nombre "antetitulo" sin comillas obvio...
2.- Al hacer el post, pongo el titulo, el contenido y en el campo personalizado selecciono "antetitulo" y en el campo valor pongo lo que se supone debería aparecer al lector
3.- Edité el archivo functions.php de la siguiente manera:

ORIGINAL FUNCTIONS.PHP

Código:
<?php
define("INC", TEMPLATEPATH . "/functions");

require_once INC . "/wpzoom-functions.php";
require_once INC . "/wpzoom-video.php";
require_once INC . "/wpzoom-core.php";

?>

FUNCTIONS.PHP MODIFICADO

Código:
<?php
define("INC", TEMPLATEPATH . "/functions");

require_once INC . "/wpzoom-functions.php";
require_once INC . "/wpzoom-video.php";
require_once INC . "/wpzoom-core.php";

    function title_prefix($content)
    {
            if ( ! in_the_loop()  )
                    return $content;
     
            $antetitulo = get_post_meta($post->ID , 'antetitulo' , true);
            if ( $antetitulo )
                    return "$antetitulo $content";
            return $content;
    }
     
    add_filter('the_title', 'title_prefix', 10, 1 );
?>

Gracias por el apoyo que me brindan, si me he equivocado en algo por favor oriéntenme. Gracias de nuevo.