Ya intentaste poner un campo personalizado con
Image y una URL(http://img8.imageshack.us/img8/4969/...englishjm1.jpg) de una imagen? a mi me suena a eso, porque en cada entrada si se ven.
Te crea un thumbail de 150 x 150
Hola gente yo tengo un template bastante lindo
pero con un problema en la pagina principal no me salen las imagenes del posts solo el texto y quizas sea esta parte del codigo
espero que alguien me ayudeCódigo HTML:<div class="spoiler"> <?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 $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=150&h=150&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="150px" height="150px" /></a> <?php } ?> </div>
Ya intentaste poner un campo personalizado con
Image y una URL(http://img8.imageshack.us/img8/4969/...englishjm1.jpg) de una imagen? a mi me suena a eso, porque en cada entrada si se ven.
Te crea un thumbail de 150 x 150
Última edición por danielmd; 07-Jun-2009 a las 23:16
No ese código hace funcionar el plugin de imagenes chiquitas (thumbs)...
El código que buscas, debe ser the_excerpt() o the_advanced_excerpt() que te permite excluir ciertas etiquetas html.
Busca algo como esto:
Código PHP:the_advanced_excerpt('length=320&exclude_tags=img,p,strong');
En esta vida solo puedes tener dos cosas: razones y resultados.
Las razones no cuentan.
A ver modifica la primer entrada y pon algo así
¿Que archivos usa tu index.php ?
Última edición por danielmd; 07-Jun-2009 a las 23:38
el code completo es este
Código HTML:<div class="clearfloat"> <h3 class=cat_title></h3> <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div> <div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div> <div class="spoiler"> <?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 $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=150&h=150&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="150px" height="150px" /></a> <?php } ?> <?php the_excerpt(); ?> </div>
como ven no aparece ni el leer más
Ok..
Intenta reemplazando the_excerpt por the_content("Leer mas")
Edito: Ayudemos a mantener el orden en el foro y al buscador... hay un subforo específico para ayuda con wordpress...
Última edición por Sanchez Toledano; 07-Jun-2009 a las 23:38
En esta vida solo puedes tener dos cosas: razones y resultados.
Las razones no cuentan.
Ok!!.. La imagen se pone como te dije arriba.
Necesitas meter un campo personalizado llamado Image en cada post + la url de la imagen thumb que aparecera a un costado.
Y para que salga leer mas necesitas modificar el archivo funtions.php
AsíCódigo PHP: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(']]>', ']]>', $text);
$text = strip_tags($text);
$excerpt_length = apply_filters('excerpt_length', 90);
$words = explode(' ', $text, $excerpt_length + 1);
if (count($words) > $excerpt_length) {
array_pop($words);
array_push($words, '...');
$text = implode(' ', $words);
}
}
return $text;
}
?>
Código PHP: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(']]>', ']]>', $text);
$text = strip_tags($text);
$excerpt_length = apply_filters('excerpt_length', 90);
$words = explode(' ', $text, $excerpt_length + 1);
if (count($words) > $excerpt_length) {
array_pop($words);
array_push($words, 'Leer mas....');
$text = implode(' ', $words);
}
}
return $text;
}
?>
Actualmente hay 1 usuarios leyendo este tema. (0 miembros y 1 invitados)