Not showing preview image on Category page

  • Posted in : Read WP
  • TotRa
    Participant

    When selecting post list by category, all the preview images for standard post are missing.

    Mehmet S.
    Keymaster

    This is normal. It is the theme design.

    TotRa
    Participant

    Thanks. Is there any way to make them appear without coding? :) Thanks in advance )

    Mehmet S.
    Keymaster

    – go to Appearance > Editor > category.php

    – find the first else code block below:

    else
    {
    	?>
    		<!-- .post -->
    		<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
    			<!-- .entry-header -->
    			<header class="entry-header">
    				<h1 class="entry-title">
    					<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
    				</h1>
    			</header>
    			<!-- end .entry-header -->
    			
    			<!-- .entry-meta --> 
    			<footer class="entry-meta">
    				<?php echo __( 'posted in', 'read' ); ?>
    				<?php the_category( ', ' ); ?>
    				<?php echo __( 'on', 'read' ); ?> <a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><time class="entry-date" datetime="2012-11-09T23:15:57+00:00"><?php echo get_the_date(); ?></time></a>
    				<span class="comments-link">
    					<?php comments_popup_link( __( '0 Comment', 'read' ), __( '1 Comment', 'read' ), __( '% Comments', 'read' ) ); ?>
    				</span>
    				<span class="by-author"> <?php echo __( 'by', 'read' ); ?>
    					<span class="author vcard">
    						<a class="url fn n" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php echo __( 'View all posts by ', 'read' ) . get_the_author(); ?>" rel="author"><?php the_author(); ?></a>
    					</span>
    				</span>				
    			</footer>
    			<!-- end .entry-meta -->
    		</article>
    		<!-- end .post -->
    	<?php
    }
    

    – remove the code lines inside the else block:

    – add only one line like this:

    get_template_part( 'format', 'standard' );
    

    – and the result must be like this:

    else
    {
    	get_template_part( 'format', 'standard' );
    }
    

    – work carefully.

    TotRa
    Participant

    Done. Thanks :)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register