• Hola,
    Estoy haciendo un sitio sobre WordPress. En él hice un menú con las diferentes categorías y dentro están todos los post organizados de esta forma.
    Mi problema es que al seleccionar una categoría se muestran los post en formato de solo texto y no muestra la «imagen destacada» que ya asigné en todas las entradas (y ya sabemos que una imagen dice más que mil palabras).
    Buscando por internet encontré esto: http://goo.gl/mJ2jT
    El problema es que construí mi template en un sitio que te permite hacerlo muy fácilmente (Lubith); y al entrar al editor no encuentro ninguna de las etiquetas que mencionan por que parece que mi tema es algo así como un tema hijo (la verdad no entiendo muy claramente este tema). Por este motivo pensé que sería mejor si lo pudiera hacer por medio de un plugin y no meterme con el código.

    Supuestamente debería insertar en archive.php:
    <a href="<?php the_permalink() ?>"> <?php postim(); ?> </a>

    Justo después de:
    <div class="post" id="post-<?php the_ID(); ?>">

    Pero no encuentro dicha línea.
    Acá está mi archive.php:

    <?php
    /**
     * The template for displaying Archive pages.
     *
     * Used to display archive-type pages if nothing more specific matches a query.
     * For example, puts together date-based pages if no date.php file exists.
     *
     * Learn more: http://codex.wordpress.org/Template_Hierarchy
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    
    get_header(); ?>
    
    		<div class="container">
    			<div id="content" role="main">
    
    <?php
    	/* Queue the first post, that way we know
    	 * what date we're dealing with (if that is the case).
    	 *
    	 * We reset this later so we can run the loop
    	 * properly with a call to rewind_posts().
    	 */
    	if ( have_posts() )
    		the_post();
    ?>
    
    			<h1 class="page-title">
    <?php if ( is_day() ) : ?>
    				<?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() ); ?>
    <?php elseif ( is_month() ) : ?>
    				<?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date('F Y') ); ?>
    <?php elseif ( is_year() ) : ?>
    				<?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date('Y') ); ?>
    <?php else : ?>
    				<?php _e( 'Blog Archives', 'twentyten' ); ?>
    <?php endif; ?>
    			</h1>
    
    <?php
    	/* Since we called the_post() above, we need to
    	 * rewind the loop back to the beginning that way
    	 * we can run the loop properly, in full.
    	 */
    	rewind_posts();
    
    	/* Run the loop for the archives page to output the posts.
    	 * If you want to overload this in a child theme then include a file
    	 * called loop-archives.php and that will be used instead.
    	 */
    	 get_template_part( 'loop', 'archive' );
    ?>
    
    			</div><!-- #content -->
    		</div><!-- .container -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Y el category.php que imagino es donde debería modificar algo, aparece lo siguiente:

    <?php
    /**
     * The template for displaying Category Archive pages.
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    
    get_header(); ?>
    
    		<div class="container">
    			<div id="content" role="main">
    
    				<h1 class="page-title"><?php
    					printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' );
    				?></h1>
    				<?php
    					$category_description = category_description();
    					if ( ! empty( $category_description ) )
    						echo '<div class="archive-meta">' . $category_description . '</div>';
    
    				/* Run the loop for the category page to output the posts.
    				 * If you want to overload this in a child theme then include a file
    				 * called loop-category.php and that will be used instead.
    				 */
    				get_template_part( 'loop', 'category' );
    				?>
    
    			</div><!-- #content -->
    		</div><!-- .container -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Por lo que alcanzo a entender, como estoy usando un child theme, las modificaciones deberían hacerse en el tema principal, o algo así (¿o me equivoco?), por esa razón pensaba que sería más sencillo usar algún plugin, pero no he encontrado alguno que haga esta eso.

    Gracias 🙂

  • El debate ‘Mostrar imagenes destacadas en filtro por categoría’ está cerrado a nuevas respuestas.