Ver Mensaje Individual
  #17 (permalink)  
Antiguo 23/03/2011, 12:26
Avatar de tranzorx
tranzorx
 
Fecha de Ingreso: marzo-2008
Mensajes: 114
Antigüedad: 16 años, 1 mes
Puntos: 7
Respuesta: Errores de validación W3C en un Theme de WordPress

YA HA VUELTO A PEGAR EL MODERADOR TODA EL HILO DE POST.
ASÍ PUEDES CONSULTAR MI PROBLEMA DESDE EL PRINCIPIO.
¡¡Muchas gracias señora moderadora!!


Hola.
No sé si he sido yo que no he sabido transcribir el código al index.php, pero se me han escogorciado todas las miniaturas y han desaparecido los estilos de CSS del body. Sólo me he quedado con el header, y ahora me sale una tabla con esta indicación:
Cita:
Fatal error: Call to undefined function has_post_thumbnail() in C:\wamp\www\wp\wp-content\themes\Ecommerce-Pink\index.php on line 19
Call Stack
# Time Memory Function Location
1 0.0006 671568 {main}( ) ..\index.php:0
2 0.0009 676432 require( 'C:\wamp\www\wp\wp-blog-header.php' ) ..\index.php:17
3 0.6775 47017352 require_once( 'C:\wamp\www\wp\wp-includes\template-loader.php' ) ..\wp-blog-header.php:16
4 0.6847 47089808 include( 'C:\wamp\www\wp\wp-content\themes\Ecommerce-Pink\index.php' ) ..\template-loader.php:43


Desde la mayor de las ignorancias: digo yo que no debería de haber un error tan gordo en una plantilla de pago.
Aquí la dirección de la plantilla:Ecommerce Theme


A continuación el nuevo index.php.
Las líneas que estaban mal las he comentado (en girs) y he añadido las nueva (en azul).
La línea 19 la he marcado en rojo.

Cita:
<?php get_header(); ?>

<!--include sidebar-->
<?php include(TEMPLATEPATH."/l_sidebar.php");?>

<div id="content">
<!--index.php-->

<?php if (have_posts()) : while (have_posts()) : the_post(); // the loop ?>

<!-- <div id="post-<?php the_ID(); ?>" class="thumbnail">
<a href="<?php echo get_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><h3 id="post-title-<?php the_ID(); ?>"><?php the_title(); ?></h3><img src="<?php echo get_post_meta($post->ID, "Thumbnail", true); ?>" alt="<?php the_title(); ?> <?php _e(''); ?>" /></a> -->


<!-- PRINCIPIO CODIGO NUEVO -->

<h3 id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>

<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.

the_post_thumbnail();

}
the_content();
?>
<!-- FINAL CODIGO NUEVO -->


<p><?php the_category(', ') ?></p>
</div>



<?php endwhile; // end of one post ?>

<!-- Previous/Next page navigation -->
<div class="page-nav">
<div class="nav-previous"><?php previous_posts_link('&laquo; Previous Page') ?></div>
<div class="nav-next"><?php next_posts_link('Next Page &raquo;') ?></div>
</div>

<?php else : // do not delete ?>

<h3>Page Not Found</h3>
<p>We're sorry, but the page you are looking for isn't here.</p>
<p>Try searching for the page you are looking for or using the navigation in the header or sidebar</p>

<?php endif; // do not delete ?>


<!--index.php end-->
</div>

<!--include footer-->
<?php get_footer(); ?>

Última edición por tranzorx; 23/03/2011 a las 12:39