Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » WordPress »

Colocar "balazo" al título (periódico digital)

Estas en el tema de Colocar "balazo" al título (periódico digital) en el foro de WordPress en Foros del Web. Buenas tardes a todos, estoy aquí para solicitarles su valiosa ayuda con un problemita que me tiene de cabeza. Estoy implementando un periódico digital en ...

  #1 (permalink)  
Antiguo 18/05/2011, 14:38
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Colocar "balazo" al título (periódico digital)

Buenas tardes a todos, estoy aquí para solicitarles su valiosa ayuda con un problemita que me tiene de cabeza. Estoy implementando un periódico digital en wordpress sin embargo mi cliente me refiere que es necesario que al hacer el post haya posibilidad de poner o no poner según sea el caso el "balazo" correspondiente al titulo.

¿Qué es un balazo? Para no entrar en rollos interminables les dejo un ejemplo:



Ojala alguno de ustedes pueda ayudarme, o si implementarlo tuviera algún costo porfavor avisenme aqui mismo en el post.

LINK: [URL="http://tinyurl.com/3wk5v38"]El sitio donde estoy haciendo pruebas.[/URL]

Muchas gracias.
  #2 (permalink)  
Antiguo 18/05/2011, 14:58
Avatar de metacortex
Viejo demente
 
Fecha de Ingreso: junio-2004
Ubicación: Caracas - Venezuela
Mensajes: 9.027
Antigüedad: 19 años, 10 meses
Puntos: 832
Respuesta: Colocar "balazo" al título (periódico digital)

Para quienes no puedan ver la imagen debido a las restricciones de Tinypic:



Eso es un antetítulo. Lo logras asignando un campo personalizado.

En tu editor:

En el módulo Campos Personalizados asigna antetitulo como clave y el texto que quieras como valor.

En tu archivo functions.php:

Código PHP:
Ver original
  1. <?php
  2. function mi_antetitulo() {
  3.     global $post;
  4.     $antetitulo = get_post_meta($post->ID , 'antetitulo' , true);
  5.  
  6.     if(true == $antetitulo)
  7.         echo '<p class="antetitulo">'. $antetitulo .'</p>';
  8. }
  9. ?>
En tu plantilla:

Coloca justo encima del código correspondiente a the_title():

Código PHP:
Ver original
  1. <?php mi_antetitulo(); ?>
  #3 (permalink)  
Antiguo 18/05/2011, 15:25
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

metacortex:

Primero que nada muchísimas gracias por tomarte el tiempo de responderme, pero tengo algunas dudas respecto a tu indicación, en mi WP que acabo de bajar, es versión 3.1.2 no encuentro por ningún lado el módulo de "campos personalizados", ¿me podrías indicar donde esta el módulo o en donde lo consigo?

Gracias nuevamente.
  #4 (permalink)  
Antiguo 18/05/2011, 15:38
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

Perdón, ya me aparecen en donde se redactan los post, no estaba seleccionado que los desplegara... llegué hasta ahí, y me aparecen varios campos, entiendo que en la columna de la izquierda debo seleccionar algo de lo que ya está listado como stp-title?
  #5 (permalink)  
Antiguo 18/05/2011, 18:26
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

Una última pregunta, ¿en qué archivos de la plantilla debo colocar ese código? Gracias
  #6 (permalink)  
Antiguo 18/05/2011, 18:40
Avatar de metacortex
Viejo demente
 
Fecha de Ingreso: junio-2004
Ubicación: Caracas - Venezuela
Mensajes: 9.027
Antigüedad: 19 años, 10 meses
Puntos: 832
Respuesta: Colocar "balazo" al título (periódico digital)

Colócalo en home.php. Si no existe, entonces en index.php. Avisa por aquí si lo lograste.
  #7 (permalink)  
Antiguo 18/05/2011, 21:51
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

Estoy montando de nuevo todo de cero porque marca un error y ya no me deja accesar, en un rato regreso a postear. Gracias por estar apoyándome.
  #8 (permalink)  
Antiguo 18/05/2011, 22:15
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

Este es mi archivo Index.php no encuentro la referencia de title...

Código PHP:
<?php
global $options;
foreach (
$options as $value) {
    if (
get_settings$value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings$value['id'] ); }
}
$dateformat get_option('date_format');
$timeformat get_option('time_format');
?>

<?php get_header(); ?>




  <div id="frame">
  <div id="content">
  
  
    <div class="wrapper">
  
          <?php if ($wpzoom_featured_posts_show == 'Yes' && is_home() && $paged 2) { include(TEMPLATEPATH '/wpzoom_featured_posts.php'); } ?>
          
          <?php if ($wpzoom_featured_cats_show == 'Yes' && is_home() && $paged 2) { include(TEMPLATEPATH '/wpzoom_quick_categories.php'); } ?>
          
          <div id="main">
          
          <?php if ($wpzoom_featured_big_cats_show == 'Yes' && is_home() && $paged 2) { include(TEMPLATEPATH '/wpzoom_featured_categories.php'); } ?>
          
          <?php if ($wpzoom_recent_posts_show == 'Yes') { include(TEMPLATEPATH '/wpzoom_recent_posts.php'); } ?>
          
          </div><!-- end #main -->
          
          <div id="sidebar">
          
            <?php get_sidebar(); ?>
            
          </div><!-- end #sidebar -->
 
      <div class="cleaner">&nbsp;</div>
    </div><!-- end .wrapper -->
  </div><!-- end #content -->
  </div><!-- end #frame -->

<?php get_footer(); ?>
  #9 (permalink)  
Antiguo 18/05/2011, 22:49
Avatar de j_aroche
Server Ninja
 
Fecha de Ingreso: agosto-2006
Ubicación: iPhone: 14.624481,-90.487457
Mensajes: 2.066
Antigüedad: 17 años, 8 meses
Puntos: 223
Respuesta: Colocar "balazo" al título (periódico digital)

Hola,

¿ Sabes si la plantilla que estás usando tiene el archivo functions.php ? Si lo tiene, inserta este código (puede ser al final) :
Código PHP:
Ver original
  1. function title_prefix($content)
  2. {
  3.         if ( ! in_the_loop()  )
  4.                 return $content;
  5.  
  6.         $antetitulo = get_post_meta($post->ID , 'antetitulo' , true);
  7.         if ( $antetitulo )
  8.                 return "$antetitulo $content";
  9.         return $content;
  10. }
  11.  
  12. add_filter('the_title', 'title_prefix', 10, 1 );

De esta forma, no tienes que modificar el resto de plantillas, con cada llamada a the_title() se agregará el prefijo si el post tiene el custom field 'antetitulo'.
__________________
Blog: JavierAroche.com - Twitter: @j_aroche
  #10 (permalink)  
Antiguo 18/05/2011, 23:13
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

Muchísimas gracias j_aroche en este momento procedo a hacerlo, ya lo instalé de cero. Regreso a informar.
  #11 (permalink)  
Antiguo 18/05/2011, 23:26
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 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.
  #12 (permalink)  
Antiguo 18/05/2011, 23:47
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

NOTA: Ya edité también el archivo /wpzoom-functions.php con el mismo código pero sigue sin aparecer el campo personalizado :(
  #13 (permalink)  
Antiguo 19/05/2011, 02:33
Avatar de j_aroche
Server Ninja
 
Fecha de Ingreso: agosto-2006
Ubicación: iPhone: 14.624481,-90.487457
Mensajes: 2.066
Antigüedad: 17 años, 8 meses
Puntos: 223
Respuesta: Colocar "balazo" al título (periódico digital)

bueno entonces no tengo idea de porque no funciona con el theme... además parece que es pagado así que no pude bajar el código de este.
__________________
Blog: JavierAroche.com - Twitter: @j_aroche
  #14 (permalink)  
Antiguo 19/05/2011, 07:34
Avatar de rogertm
Mod->Cuba
 
Fecha de Ingreso: julio-2005
Ubicación: /home/Cuba/Habana/rogertm/
Mensajes: 2.922
Antigüedad: 18 años, 9 meses
Puntos: 638
Respuesta: Colocar "balazo" al título (periódico digital)

@ixac sería bueno que te dieras una vueltica por el Codex y revisaras la documentación referente a los Custom Fields, y te la estudies claro, tal vez encuentres algo interesante y te aclare un poco la situación...

Saludos
__________________
Friki y Blogger por Cuenta Propia:213
Twenty'em: Theming is Prose
  #15 (permalink)  
Antiguo 19/05/2011, 09:58
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

Gracias a todos por sus respuestas, en verdad han sido muy amables.

Sigo sin poder, como no sé nada de php realmente no le entiendo a la documentación, respecto al template yo bajé el 1.2 de un portal, sobre ese trabajo, hasta donde entiendo está completo, no sé si podrían mandarme un mensaje privado para que los mande y quizás si lo tienen me pudieran ayudar mejor, la verdad ya no sé qué hacer.

Todo va super con el template excepto por el famoso antetitulo que tengo que poner a fuerzas.

¿a quién de ustedes le podría mandar la plantilla? estoy dispuesta a pagar honorarios si fuera necesario.

Mil gracias.
  #16 (permalink)  
Antiguo 19/05/2011, 11:06
Avatar de rogertm
Mod->Cuba
 
Fecha de Ingreso: julio-2005
Ubicación: /home/Cuba/Habana/rogertm/
Mensajes: 2.922
Antigüedad: 18 años, 9 meses
Puntos: 638
Respuesta: Colocar "balazo" al título (periódico digital)

A ver, la referencia a the_title() seguro la encontrarás en los archivos wpzoom_featured_posts.php, wpzoom_quick_categories.php, wpzoom_featured_categories.php y wpzoom_recent_posts.php, entonces tienes dos opciones, la que te da @metacortex y la que te da @j_aroche, puedes usar la que más te te guste...

A la hora de crear tu post, te debe salir un campo así:


Basándonos en la imagen, donde dice Test, deberás poner el nombre de tu campo antetitulo, y en el valor, en contenido del antetítulo en si...

Saludos
__________________
Friki y Blogger por Cuenta Propia:213
Twenty'em: Theming is Prose
  #17 (permalink)  
Antiguo 19/05/2011, 13:28
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

gracias por responder rogertm

Voy a hacerlo como me dices tomando la opción de metacortex y regreso a contar como me fue.
  #18 (permalink)  
Antiguo 19/05/2011, 13:33
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

UPSSSS!!! estoy revisando los archivos que me mencionaste rogertm y encuentro varios the_title():

¿cuánto me cobrarías por implementarlo tú? realmente no sé dónde ponerlo.
  #19 (permalink)  
Antiguo 19/05/2011, 14:02
Avatar de rogertm
Mod->Cuba
 
Fecha de Ingreso: julio-2005
Ubicación: /home/Cuba/Habana/rogertm/
Mensajes: 2.922
Antigüedad: 18 años, 9 meses
Puntos: 638
Respuesta: Colocar "balazo" al título (periódico digital)

Cita:
Iniciado por ixac Ver Mensaje
UPSSSS!!! estoy revisando los archivos que me mencionaste rogertm y encuentro varios the_title():

¿cuánto me cobrarías por implementarlo tú? realmente no sé dónde ponerlo.
Uhmmm... Tal vez podría pedirte unos 10.000 Euros ...

Mejor pones algo del código que tienes y podremos ayudarte mucho mejor...
__________________
Friki y Blogger por Cuenta Propia:213
Twenty'em: Theming is Prose
  #20 (permalink)  
Antiguo 19/05/2011, 14:24
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

Jejeje, me da un poco de pena, es que no sé si sea conveniente poner mejor todos los archivos aquí (los que mencionaste) no quisiera dar más lata de la que ya di y traerlos dando vueltas.
  #21 (permalink)  
Antiguo 19/05/2011, 14:36
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

Pero me voy a animar, espero no ser imprudente, sé que me ayudan de buena fe, y pues es que yo veo todo este código y no es como modificar una cosa sencilla, me atoro mucho... gracias de antemano por todo.


Pondré los archivos en varios mensajes:

Funciones del tema (functions.php)

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

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

?>
Plantilla de la página principal (index.php)

Código PHP:
<?php
global $options;
foreach (
$options as $value) {
    if (
get_settings$value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings$value['id'] ); }
}
$dateformat get_option('date_format');
$timeformat get_option('time_format');
?>

<?php get_header(); ?>




  <div id="frame">
  <div id="content">
  
  
    <div class="wrapper">
  
          <?php if ($wpzoom_featured_posts_show == 'Yes' && is_home() && $paged 2) { include(TEMPLATEPATH '/wpzoom_featured_posts.php'); } ?>
          
          <?php if ($wpzoom_featured_cats_show == 'Yes' && is_home() && $paged 2) { include(TEMPLATEPATH '/wpzoom_quick_categories.php'); } ?>
          
          <div id="main">
          
          <?php if ($wpzoom_featured_big_cats_show == 'Yes' && is_home() && $paged 2) { include(TEMPLATEPATH '/wpzoom_featured_categories.php'); } ?>
          
          <?php if ($wpzoom_recent_posts_show == 'Yes') { include(TEMPLATEPATH '/wpzoom_recent_posts.php'); } ?>
          
          </div><!-- end #main -->
          
          <div id="sidebar">
          
            <?php get_sidebar(); ?>
            
          </div><!-- end #sidebar -->
 
      <div class="cleaner">&nbsp;</div>
    </div><!-- end .wrapper -->
  </div><!-- end #content -->
  </div><!-- end #frame -->

<?php get_footer(); ?>
wpzoom-core.php

Código PHP:
<?php 

/* Enabling Localization */
load_theme_textdomain'wpzoom'TEMPLATEPATH.'/languages' );

$locale get_locale();
$locale_file TEMPLATEPATH."/languages/$locale.php";
if ( 
is_readable($locale_file) )
    require_once(
$locale_file);

if (
function_exists('register_nav_menus')) {
register_nav_menus( array(
        
'primary' => __'Header Menu''wpzoom' ),
        
'secondary' => __'Footer Menu''wpzoom' ),
    ) );
}

     if ( 
function_exists'add_theme_support'  ) ) { 

      
// This theme allows users to set a Post Thumbnail. Added in 2.9
    
add_theme_support'post-thumbnails' );
    
set_post_thumbnail_size150120true ); // Normal post thumbnails
    
add_image_size'homecat'9999175 ); // Permalink thumbnail size
    
    
}
    
    if ( 
function_exists'add_custom_background'  ) ) { 
    
// This theme allows users to set a custom background. Added in 3.0
    
add_custom_background();
    }
    
    if (
is_admin() && $_GET['activated'] == 'true') {
    
header("Location: admin.php?page=wpzoom_options");
    }


    if (
is_admin() && $_GET['page'] == 'wpzoom_options') {
        
add_action('admin_head''wpzoom_admin_css');
        
// wp_enqueue_script('jquery');
        
wp_enqueue_script('tabs'get_bloginfo('template_directory').'/wpzoom_admin/simpletabs.js');
    }
    
function 
wpzoom_admin_css() {
    echo 
'
    <link rel="stylesheet" type="text/css" media="screen" href="'
.get_bloginfo('template_directory').'/wpzoom_admin/options.css" />
    '
;
}
 
$functions_path TEMPLATEPATH '/wpzoom_admin/';
require_once (
$functions_path 'admin_functions.php');
$homepath get_bloginfo('stylesheet_directory');

add_action('admin_menu''wpzoom_add_admin');

if ( 
function_exists('register_sidebar') )

register_sidebar(array('name'=>'Sidebar',
'before_widget' => '<div class="widget">',
'after_widget' => '<div class="cleaner">&nbsp;</div>
              
              </div>
            </div>'
,
'before_title' => '<div class="title">
              <h3>'
,
'after_title' => '</h3>
            </div><!-- end .title -->
              <div class="box">'
,
));
?>
  #22 (permalink)  
Antiguo 19/05/2011, 14:40
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

wpzoom-functions.php

[URL="http://www.tuentorno.mx/00/wpzoom-functions.txt"]DESCARGAR AQUÍ[/URL]... es mucho código y no permite postearlo.

wpzoom_featured_categories.php

Código PHP:
          <div id="featCategories">

          <?php
          $cc 
0;
          
$c 10;
          
          while (
$cc $c)
          {
          
          
$cc++;
          
$category "wpzoom_featured_big_category_" "$cc";
          
          if ($
$category != 0)
          {
          
          
$cat get_category($$category,false);
          
          
$catlink get_category_link($$category);
          
            
    
$breaking_cat "cat=".$$category;  // Breaking tag slug
    
    
wp_reset_query();
    
    
query_posts("showposts=$wpzoom_featured_big_categories_posts&$breaking_cat&order_by=post_date&order=DESC");

    
?>

            <div class="category<?php if (!($cc &#37; 2)) {echo ' category-last';} ?>">
            
              <div class="title">
                <a href="<?php echo get_category_feed_link($$category$feed ); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/icon_rss.png" alt="" /></a>
                <h3><a href="<?php echo"$catlink";?>"><?php echo"$cat->name";?></a></h3>
              </div><!-- end .title -->
              
              <div class="box">
              
<?php if ( have_posts() ) : ?>
            <ul class="posts">
<?php    
$x 
0;
while (
have_posts()) : the_post(); 
$x++;
if (
$x == 1)

?>
                <li class="first">
                  <?php unset($img);
if ( 
current_theme_supports'post-thumbnails' ) && has_post_thumbnail() ) {
                        
$thumbURL wp_get_attachment_image_srcget_post_thumbnail_id($post->ID), '' );
            
$img $thumbURL[0]; 
                        }

            else {
                unset(
$img);
                if (
$wpzoom_cf_use == 'Yes')
                {
                  
$img get_post_meta($post->ID$wpzoom_cf_phototrue);
                }
                else
                {
                  if (!
$img)
                  {
                    
$img catch_that_image($post->ID);
                  }
                }
              }

         if (
$img){ 
         
$img wpzoom_wpmu($img);
         
?>
                  <div class="cover"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img ?>&amp;h=160&amp;w=280&amp;zc=1" width="280" height="160" alt="<?php the_title(); ?>" /></a></div><?php ?>
                  <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
                  <p><?php the_content_limit(140''); ?></p>
                </li>
<?php // if $x == 1
else{ ?>
                <li><h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></li><?php // else ?>
<?php 
endwhile; //  ?>
            </ul>
  <?php else : ?>
  
  <p class="title"><?php _e('There are no posts in this category''wpzoom');?></p>
  
  <?php endif; ?>
              
              <div class="cleaner">&nbsp;</div>
              
              </div><!-- end .box -->
            
            </div><!-- end .category -->

      <?php // if category is set
          
// while categories    
      
?>
            
            <div class="cleaner">&nbsp;</div>
          
          </div><!-- end #featCategories -->
          
          <div class="cleaner">&nbsp;</div>
          <?php wp_reset_query(); ?>
wpzoom_featured_posts.php

Código PHP:
<?php
          $args 
= array('showposts' => $wpzoom_featured_posts_posts'orderby' => 'date''order' => 'DESC');

          
$featType $wpzoom_featured_type;
          
          if (
$featType == 'Tag')
          {
            
$args['tag'] = "$wpzoom_featured_slug";  // Breaking tag slug
          
}
          elseif (
$featType == 'Category')
          {
            
$args['cat'] = "$wpzoom_featured_slug";  // Breaking tag slug
          
}
?>

          <div id="featPosts">
          
            <div id="postsBig">
            <div class="box">
              <div class="container">
            
              <?php 
              query_posts
($args);
              
$i 0;
              if ( 
have_posts() ) : ?>
<?php $AE 
= new AutoEmbed(); // loading the AutoEmbed PHP Class ?>
              <ul class="posts slides">
                <?php while (have_posts()) : the_post(); update_post_caches($posts); 
                unset(
$videocode);
                
$videocode get_post_meta($post->ID'wpzoom_post_embed_code'true);
                
?>
                <li class="slide">
<?php
            
if ($videocode && $AE->parseUrl($videocode)) {
                
$AE->setParam('wmode','transparent');
                
$AE->setParam('autoplay','false');
                
$AE->setHeight(350);
                
$AE->setWidth(600);

                
?><div class="cover"><?php echo $AE->getEmbedCode(); ?></div><?php 
            
} else {
            
?>
                  <?php unset($img);
if ( 
current_theme_supports'post-thumbnails' ) && has_post_thumbnail() ) {
                        
$thumbURL wp_get_attachment_image_srcget_post_thumbnail_id($post->ID), '' );
            
$img $thumbURL[0]; 
                        }

            else {
                unset(
$img);
                if (
$wpzoom_cf_use == 'Yes')
                {
                  
$img get_post_meta($post->ID$wpzoom_cf_phototrue);
                }
                else
                {
                  if (!
$img)
                  {
                    
$img catch_that_image($post->ID);
                  }
                }
              }

         if (
$img){ 
         
$img wpzoom_wpmu($img);
         
?>
        <div class="cover"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img ?>&amp;h=300&amp;w=600&amp;zc=1" alt="<?php the_title(); ?>" width="600" height="300" /></a></div>
        <?php // if an image exists
        
// if a video does not exist ?>
                  <div class="postcontent">
                    <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
                    <div class="postmetadata">
                      <ul>
                        <li class="calendar"><?php the_time("$dateformat"); ?></li>
                        <li class="author"><?php _e('By''wpzoom');?> <?php the_author_posts_link(); ?></li>
                        <li class="category"><?php the_category(', '); ?></li>
                        <li class="comments"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number(__('no comments''wpzoom'),__('1 comment''wpzoom'),__('% comments''wpzoom')); ?></a></li>
                      </ul>
                    </div>
                    <?php the_excerpt(); ?>
                  </div>
                  <div class="cleaner">&nbsp;</div>
                </li><?php endwhile; ?>
              </ul><?php endif; ?>
              <div class="cleaner">&nbsp;</div>
              </div><!-- end .container -->
            </div><!-- end .box -->
            </div><!-- end #postsBig -->
            
            <div id="postsSmall">
            <div class="box box-nopadd">
            
              <?php 
              query_posts
($args);
              
$i 0;
              if ( 
have_posts() ) : ?>
              <ul class="posts pagination">
                <?php while (have_posts()) : the_post(); update_post_caches($posts); ?>
                <li><a href="#" rel="nofollow">
                  <?php unset($img);
if ( 
current_theme_supports'post-thumbnails' ) && has_post_thumbnail() ) {
                        
$thumbURL wp_get_attachment_image_srcget_post_thumbnail_id($post->ID), '' );
            
$img $thumbURL[0]; 
                        }

            else {
                unset(
$img);
                if (
$wpzoom_cf_use == 'Yes')
                {
                  
$img get_post_meta($post->ID$wpzoom_cf_phototrue);
                }
                else
                {
                  if (!
$img)
                  {
                    
$img catch_that_image($post->ID);
                  }
                }
              }

         if (
$img){ 
         
$img wpzoom_wpmu($img);
         
?>
        <div class="cover"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img ?>&amp;h=30&amp;w=45&amp;zc=1" height="30" width="45" alt="<?php the_title(); ?>" /></div><?php ?>
                  <div class="postcontent">
                    <h2><?php the_title(); ?></h2>
                    <p><?php the_content_limit('80'); ?></p>
                  </div>
                  <div class="cleaner">&nbsp;</div>
                </a></li><?php endwhile; ?>
                <div class="cleaner">&nbsp;</div>
              </ul><?php endif; ?>
              <div class="cleaner">&nbsp;</div>
            </div><!-- end .box -->
            </div><!-- end #postsSmall -->
          
          <div class="cleaner">&nbsp;</div>
          
          </div><!-- end #featPosts -->
          <?php wp_reset_query(); ?>

<script type="text/javascript" charset="utf-8">
jQuery(document).ready(
function($)
{
        $('#featPosts').loopedSlider({
            autoHeight: true,
            containerClick: false,
            slidespeed: 500,
            autoStart: <?php echo $wpzoom_featured_posts_autoplay?>
        });
    });
</script>
  #23 (permalink)  
Antiguo 19/05/2011, 14:43
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

Y por último,

wpzoom_recent_posts.php

Código PHP:
        <?php wp_reset_query(); ?>
          <div id="archive">
          
            <?php if (is_category()) { ?>
            
            <div class="title breadcrumbs">
              <?php $cat_ID get_query_var('cat'); ?>
              <a href="<?php echo get_category_feed_link($cat_ID'' ); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/icon_rss.png" alt="" /></a>
              <?php echo '<h3>'wpzoom_breadcrumbs(); echo'</h3>'?>
            </div><!-- end .title -->
            
            <?php 
            elseif (!
is_category() && !is_home()) { ?>
            
            <div class="title breadcrumbs">
              <?php echo '<h3>'wpzoom_breadcrumbs(); echo'</h3>'?>
            </div><!-- end .title -->
            
            <?php }
            else { 
?>
            
            <div class="title">
              <h3><?php _e('Recent Posts''wpzoom');?></h3>
            </div><!-- end .title -->
            <?php ?>
            
            <div class="box">
            
<?php if (have_posts()) : ?>
            <ul class="posts">
<?php    
    
while (have_posts()) : the_post();
    
$i++;
?>
              <li>
                <?php unset($img);
if ( 
current_theme_supports'post-thumbnails' ) && has_post_thumbnail() ) {
                        
$thumbURL wp_get_attachment_image_srcget_post_thumbnail_id($post->ID), '' );
            
$img $thumbURL[0]; 
                        }

            else {
                unset(
$img);
                if (
$wpzoom_cf_use == 'Yes')
                {
                  
$img get_post_meta($post->ID$wpzoom_cf_phototrue);
                }
                else
                {
                  if (!
$img)
                  {
                    
$img catch_that_image($post->ID);
                  }
                }
              }

         if (
$img){ 
         
$img wpzoom_wpmu($img);
         
?>
        <div class="cover"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img ?>&amp;h=120&amp;w=160&amp;zc=1" width="160" height="120" alt="<?php the_title(); ?>" /></a></div><?php ?>
                <div class="postcontent">
                  <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
                  <div class="postmetadata">
                    <ul>
                      <li class="calendar"><?php the_time("$dateformat"); ?></li>
                      <li class="author"><?php _e('By''wpzoom');?> <?php the_author_posts_link(); ?></li>
                      <li class="category"><?php the_category(', '); ?></li>
                      <li class="comments"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number(__('no comments''wpzoom'),__('1 comment''wpzoom'),__('% comments''wpzoom')); ?></a></li>
                    </ul>
                  </div>
                  <?php the_excerpt(); ?>
                  <p class="more"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="readmore" rel="nofollow"><?php _e('continue reading &raquo;''wpzoom');?></a> <?php edit_post_link__('Edit this post''wpzoom'), ' | '''); ?></p>
                </div>
                <div class="cleaner">&nbsp;</div>
                <div class="sep">&nbsp;</div>
              </li>
<?php endwhile; //  ?>
            </ul>
            <div class="cleaner">&nbsp;</div>
  <?php else : ?>
  
  <p class="title"><?php _e('There are no posts in this category''wpzoom');?></p>
  
  <?php endif; ?>

          <div class="navigation">
            <p class="more"><?php next_posts_link(__('&laquo; Older Entries''wpzoom')); ?><?php previous_posts_link(__('Newer Entries &raquo;''wpzoom')); ?></p>
          </div><!-- end .navigation -->

            </div><!-- end .box -->

          </div><!-- end #archive -->
          
          <div class="cleaner">&nbsp;</div>

Pues ahi están los archivos, no sé si me haga falta alguno más, o si incluso postee de más, gracias por ayudarme.
  #24 (permalink)  
Antiguo 19/05/2011, 15:06
Avatar de rogertm
Mod->Cuba
 
Fecha de Ingreso: julio-2005
Ubicación: /home/Cuba/Habana/rogertm/
Mensajes: 2.922
Antigüedad: 18 años, 9 meses
Puntos: 638
Respuesta: Colocar "balazo" al título (periódico digital)

Pues en tu archivo functions.php pegas el código que te dio @metacortex, entonces en cada uno de esos archivos, donde quieras que veas the_title():
Código PHP:
Ver original
  1. <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
pegas el llamado a dicha función, algo así:
Código PHP:
Ver original
  1. <?php mi_antetitulo(); ?>
  2. <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
Creo que para que esté perfecto pudieras hacer algo así:
Código PHP:
Ver original
  1. <h2>
  2.     <span><?php mi_antetitulo(); ?></span>
  3.     <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
  4. </h2>
Osea, meter todo dentro del h2, luego con CSS acomodas el antetítulo dentro de la etiqueta span para que le des forma...

Saludos...
__________________
Friki y Blogger por Cuenta Propia:213
Twenty'em: Theming is Prose
  #25 (permalink)  
Antiguo 19/05/2011, 15:11
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

En cual de estos dos pego lo que me dijo @metacortex ??

wpzoom-functions.php ó functions.php



muchas gracias, saludos!
  #26 (permalink)  
Antiguo 19/05/2011, 15:13
Avatar de rogertm
Mod->Cuba
 
Fecha de Ingreso: julio-2005
Ubicación: /home/Cuba/Habana/rogertm/
Mensajes: 2.922
Antigüedad: 18 años, 9 meses
Puntos: 638
Respuesta: Colocar "balazo" al título (periódico digital)

En functions.php, al final...

Ah! vale también que cometas algún que otro error, así le vas perdiendo el miedo al asunto jejeje...
__________________
Friki y Blogger por Cuenta Propia:213
Twenty'em: Theming is Prose
  #27 (permalink)  
Antiguo 19/05/2011, 15:17
Avatar de metacortex
Viejo demente
 
Fecha de Ingreso: junio-2004
Ubicación: Caracas - Venezuela
Mensajes: 9.027
Antigüedad: 19 años, 10 meses
Puntos: 832
Respuesta: Colocar "balazo" al título (periódico digital)

Cita:
Iniciado por ixac Ver Mensaje
En cual de estos dos pego lo que me dijo @metacortex ??

wpzoom-functions.php ó functions.php
Cita:
Iniciado por rogertm Ver Mensaje
en tu archivo functions.php
Pon de tu parte viejo.
  #28 (permalink)  
Antiguo 19/05/2011, 15:46
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

Hola metacortex, soy niña jajajaja
sorry, es que pregunto porque me confundo, ,me doy cuenta que el template es muy diferente a todos los demás que he montado.
  #29 (permalink)  
Antiguo 19/05/2011, 16:03
 
Fecha de Ingreso: octubre-2008
Mensajes: 48
Antigüedad: 15 años, 6 meses
Puntos: 5
Respuesta: Colocar "balazo" al título (periódico digital)

Ok, sé que parezco de kindergarden pero voy a poco a poco

en el archivo wpzoom-functions.php estoy colocando el código de antetitulo, esto es lo primero que he modificado:


Código PHP:
    } elseif ( is_single() ) {
      
$cat get_the_category(); $cat $cat[0];
      echo 
get_category_parents($catTRUE' ' $delimiter ' ');
      echo 
$currentBefore;
      
mi_antetitulo();
      
the_title();
      echo 
$currentAfter;
 
    } elseif ( 
is_page() && !$post->post_parent ) {
      echo 
$currentBefore;
      
mi_antetitulo();
      
the_title();
      echo 
$currentAfter
En el mismo archivo después hay esta línea y me atoré, no sé en donde ponerlo.

Código PHP:
    } elseif ( is_page() && $post->post_parent ) {
      
$parent_id  $post->post_parent;
      
$breadcrumbs = array();
      while (
$parent_id) {
        
$page get_page($parent_id);
        
$breadcrumbs[] = '<a href="' get_permalink($page->ID) . '">' get_the_title($page->ID) . '</a>';
        
$parent_id  $page->post_parent;
      } 
  #30 (permalink)  
Antiguo 19/05/2011, 16:09
Avatar de metacortex
Viejo demente
 
Fecha de Ingreso: junio-2004
Ubicación: Caracas - Venezuela
Mensajes: 9.027
Antigüedad: 19 años, 10 meses
Puntos: 832
Respuesta: Colocar "balazo" al título (periódico digital)

Ese segundo bloque que muestras es el breadcrumb (menú de navergación por categorías). Ahí no hace falta.

Trata de seguir el consejo de Roger publicado anteriormente. Por ejemplo, tu archivo wpzoom_featured_categories.php y wpzoom_featured_posts.php tienen la etiqueta y puedes hacer los cambios.

Cita:
Iniciado por ixac Ver Mensaje
Hola metacortex, soy niña jajajaja

Etiquetas: Ninguno
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Tema Cerrado




La zona horaria es GMT -6. Ahora son las 11:35.