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

Headline

Estas en el tema de Headline en el foro de WordPress en Foros del Web. Hola estoy utilizando el theme arthemia y tengo un problema en el header. Cuando pongo una noticia en headline (la noticia en grande), esta todo ...
  #1 (permalink)  
Antiguo 29/03/2011, 10:58
 
Fecha de Ingreso: enero-2010
Mensajes: 400
Antigüedad: 14 años, 3 meses
Puntos: 6
Headline

Hola estoy utilizando el theme arthemia y tengo un problema en el header.
Cuando pongo una noticia en headline (la noticia en grande), esta todo barbaro.
Yo la noticia en grande la mantego, entonces cuando agrego otra noticia la pongo en otra categoria para que se vea abajo, pero surge un problema...
La entrada de abajo aparece perfecta, pero la grande sigue igual con la misma imagen todo pero con el titulo de la entrada que agregue en la parte inferior.
Que puede estar pasando? me empezo a andar mal porque tenia el titulo abajo de la imagen y yo lo movi a la parte superior de la imagen y ahora me doy cuenta que andan mal los titulos les dejo el codigo header:

Código PHP:
 <div id="headline">    <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
        <?php
        
//Get value from Admin Panel
            
$cp_categories get_categories('hide_empty=0');
            
$ar_headline get_settings"ar_headline" );
            if( 
$ar_headline == ) { $ar_headline $cp_categories[0]->cat_ID; }
            
query_posts'showposts=1&cat=' $ar_headline );
             
?>
        <div class="label"><a href="<?php echo get_category_link($ar_headline);?>"></a></div>

        <?php while (have_posts()) : the_post(); ?>    
        
    <div class="clearfloat">
    <?php $width get_settings "cp_thumbWidth_Headline" );
        
$height get_settings "cp_thumbHeight_Headline" );
        if ( 
$width == ) { $width 200; }
        if ( 
$height == ) { $height 225; }
    
?>
    
    <?php $status get_settings "cp_thumbAuto" );
        if ( 
$status != "first" ) { ?>
        
    <?php $values get_post_custom_values("Image");
    if (isset(
$values[0])) { ?>
     <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo get_option('home'); ?>/<?php
$values 
get_post_custom_values("Image"); echo $values[0]; ?>&amp;w=<?php echo $width?>&amp;h=<?php echo $height?>&amp;zc=1&amp;q=100"
alt="<?php the_title(); ?>" class="left" width="<?php echo $width?>px" height="<?php echo $height?>px"  /></a>
     <?php ?>
    
    <?php } else { ?>
    
    <?php $id =$post->ID;
$the_content =$wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $id");
$pattern '!<img.*?src="(.*?)"!';
preg_match_all($pattern$the_content$matches);
$image_src $matches['1'][0]; ?>

    <?php if($image_src != '') { ?><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo $image_src?>&amp;w=<?php echo $width?>&amp;h=<?php echo $height?>&amp;zc=1&amp;q=100"
    alt="<?php the_title(); ?>" class="left" <?php if ($style != "wide") { } else { echo "style=\"margin-bottom:10px;padding:0px;\""; } ?> width="<?php echo $width?>px" height="<?php echo $height?>px"  /></a><?php ?>
    <?php ?>
        <?php the_excerpt() ?>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Leer m&aacute;s &raquo;</a></div>
<div class="fecha"><?php the_time('l, j/m/y'?> | <?php if(function_exists('the_views')) { the_views(); } ?> | 
      <?php comments_popup_link('Comentá la nota!''1 Comentario''% Comentarios');?>
    </div></td>
      </tr>
    </table>
    <br />
    <?php endwhile; ?>
    </div>
Otra cosa en el functions.php en la parte de excerpt (para cortar las palabras) necesito agregarle el link de ver mas despues de los ... que se ponen para resurmir, si alguno sabe por favor que me ayude. este es el codigo:

Código PHP:
// excerpt
remove_filter('get_the_excerpt''wp_trim_excerpt');
add_filter('get_the_excerpt''custom_trim_excerpt');

function 
custom_trim_excerpt($text) { // Fakes an excerpt if needed
global $post;
    if ( 
'' == $text ) {
        
$text get_the_content('');

        
$text strip_shortcodes$text );

        
$text apply_filters('the_content'$text);
        
$text str_replace(']]>'']]&gt;'$text);
        
$text strip_tags($text);
        
$excerpt_length apply_filters('excerpt_length'20);
        
$words explode(' '$text$excerpt_length 1);
        if (
count($words) > $excerpt_length) {
            
array_pop($words);
            
array_push($words'...');
            
$text implode(' '$words);
        }
    }
    return 
$text;


Última edición por bbrian; 29/03/2011 a las 11:05

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.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:19.