Ver Mensaje Individual
  #4 (permalink)  
Antiguo 21/03/2011, 16:10
Avatar de tranzorx
tranzorx
 
Fecha de Ingreso: marzo-2008
Mensajes: 114
Antigüedad: 16 años, 9 meses
Puntos: 7
Respuesta: Errores de validación W3C en un Theme de WordPress

Hola de nuevo.
Muchas gracias amigo Master.
Casi aciertas el pleno, pero nos falta la otra mitad.

Modifiqué exitosamente el que pone

Código PHP:
Ver original
  1. post-title-<?php the_ID();  ?>

Sin embargo el de la miniatura "Thumbnail" no he tenido suerte con él.
He probado las siguientes combinaciones:

Código PHP:
Ver original
  1. post-thumb-<?php the_ID();  ?>
  2. post-thumbnail-<?php the_ID();  ?>
  3. post-Thumbnail-<?php the_ID();  ?>

Pero ninguna de las tres combinaciones me ha dado éxito.

¿En qué archivo habría que mirar para hacerlo exacto?

Creo que el meollo del asunto está en editar correctamente esta lineas del index.php

Código PHP:
Ver original
  1. <div id="post-<?php the_ID(); ?>" class="thumbnail">

Gracias por la ayuda.

P.D.:
La lista de los archivos de la plantilla más significativos.
El post no me permitía más, pero si es necesario abro otro y pego el resto.


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

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

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

<h1><?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

<?php /* If this is a category archive */ if (is_category()) { ?>
<?php echo single_cat_title(); ?>

<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
Archive for <?php the_time('F jS, Y'); ?>

<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
Archive for <?php the_time('F, Y'); ?>

<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
Archive for <?php the_time('Y'); ?>

<?php /* If this is a search */ } elseif (is_search()) { ?>
Search Results

<?php /* If this is an author archive */ } elseif (is_author()) { ?>
Author Archive

<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
Blog Archives

<?php } //do not delete ?>

</h1>

<?php 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-<?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>
<p><?php the_category(', ') ?></p>
</div>

<?php endwhile; //end 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 ?>


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

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


Comments.php

Cita:
<?php // Do not delete these lines
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');

if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
?>

<p class="nocomments">This post is password protected. Enter the password to view comments.<p>

<?php
return;
}
}

/* This variable is for alternating comment background */
$oddcomment = 'odd';
$trackback_check = "true";
?>

<!-- You can start editing here. -->

<div id="comments">

<?php if ($comments) : ?>

<h4 class="comments">Customer Reviews</h4>

<!--the bgein of one comment-->
<?php foreach ($comments as $comment) : ?>
<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type == 'comment') { ?>

<div class="<?php if($oddcomment) { echo $oddcomment; } else echo 'even'; ?>" id="comment-<?php comment_ID() ?>">

<div class="comment-head">
By <?php comment_author_link() ?> on <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('e','',''); ?>
</div>

<?php if ($comment->comment_approved == '0') : ?>
<em>Your comment is awaiting moderation.</em><br />
<?php endif; ?>

<?php comment_text() ?>

</div>

<?php /* Changes every other comment to a different class */
if ('odd' == $oddcomment) $oddcomment = '';
else $oddcomment = 'odd';
?>

<?php } /* End of is_comment statement */ ?>
<?php endforeach; /* end for each comment */ ?>

<?php foreach ($comments as $comment) : ?>
<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type != 'comment') { ?>

<?php if ($trackback_check == "true") { // some sloppy php to get the <h4></h4> and <ul> to display ?>
<h4>Trackbacks</h4>
<ul>
<?php } //end trackback_check if ?>

<li id="comment-<?php comment_ID() ?>">
<strong><?php comment_author_link() ?></strong>
</li>
<?php $trackback_check = "false"; ?>

<?php } ?>
<?php endforeach; ?>

<?php if ($trackback_check == "false") { // if there was at lease 1 trackback, then close the ul ?>
</ul>
<?php } //end trackback_check if ?>

<?php else : // this is displayed if there are no comments so far ?>

<?php if ('open' == $post->comment_status) : //If comments are open, but there are no comments ?>

<?php else : // comments are closed ?>

<p>Comments are closed.</p>

<?php endif; ?>
<?php endif; ?>

<div id="respond" class="postspace2">&nbsp;</div>

<?php if ('open' == $post->comment_status) : ?>

<h4 class="respond">Review this Product</h4>

<?php if ( get_option('comment_registration') && !$user_ID ) : ?>

<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>

<?php else : ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

<?php if ( $user_ID ) : ?>
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>

<?php else : ?>

<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
<label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>

<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
<label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>

<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
<label for="url"><small>Website</small></label></p>

<?php endif; ?>

<p><textarea name="comment" id="comment" cols="42" rows="10" tabindex="4"></textarea></p>

<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p>

<?php do_action('comment_form', $post->ID); ?>

</form>

<?php endif; // If registration required and not logged in ?>

<?php endif; // if you delete this the sky will fall on your head ?>

</div> <!--end comments div-->


functions.php
Cita:
<?php
if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'Top Tag'));
register_sidebar(array('name'=>'Feature Left'));
register_sidebar(array('name'=>'Feature Right'));
register_sidebar(array('name'=>'Bottom Left Sidebar','before_widget' => '','after_widget' => '','before_title' => '<h2>','after_title' => '</h2>',));
register_sidebar(array('name'=>'Bottom Middle Sidebar','before_widget' => '','after_widget' => '','before_title' => '<h2>','after_title' => '</h2>',));
register_sidebar(array('name'=>'Bottom Right Sidebar','before_widget' => '','after_widget' => '','before_title' => '<h2>','after_title' => '</h2>',));
register_sidebar(array('name'=>'Left Sidebar','before_widget' => '','after_widget' => '','before_title' => '<h2>','after_title' => '</h2>',));
?>
<?php
//Custom Header Image Code -- from the WordPress.com API
define('HEADER_TEXTCOLOR', ''); //doesn't matter
define('NO_HEADER_TEXT', true ); //don't mess with the header text
define('HEADER_IMAGE', '%s/images/logo.jpg'); // %s is theme dir uri
define('HEADER_IMAGE_WIDTH', 1150);
define('HEADER_IMAGE_HEIGHT', 95);

function ecommerce_header_style() {
?>
<style type="text/css">
#header {
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
background: url(<?php header_image(); ?>) bottom left no-repeat;
}
</style>

<?php }
function ecommerce_admin_header_style() {
?>
<style type="text/css">
#headimg {
display: block;
margin: 0px; padding: 0px;
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
background: url(<?php header_image(); ?>) top left no-repeat;
}
#headimg h1, #headimg #desc {
display: none;
}
</style>

<?php }
add_custom_image_header('ecommerce_header_style', 'ecommerce_admin_header_style'); //Add the custom header
?>