• Resolved johnywhy

    (@johnywhy)


    why isn’t my theme showing images in the blog?

    here’s the whole theme’s index.php:

    <?php get_header(); ?>
    
    	<div id="page">
    
    		<div id="contentleft">
    
    <?php if ( $paged < 2 ) { // Do stuff specific to first page?>
    
    <?php $my_query = new WP_Query('category_name=featured&showposts=1');
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID; ?>
    
    				<div class="featurepost" id="post-<?php the_ID(); ?>">
    
    					<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    
    					<p class="postinfo">By <?php the_author_posts_link(); ?> on <?php the_time('M j, Y') ?> in <?php the_category(', ') ?> | <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?><?php edit_post_link('Edit', ' | ', ''); ?></p>
    
    					<div class="entry">
    						<?php the_content('Read the rest'); ?>
    					</div>
    
    				</div>
    
    <?php endwhile; ?>
    
    <?php query_posts(array('post__in'=>get_option('sticky_posts'))); ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post();
    
    if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    
    				<div class="post" id="post-<?php the_ID(); ?>">
    
    					<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    
    					<p class="postinfo">By <?php the_author_posts_link(); ?> on <?php the_time('M j, Y') ?> in <?php the_category(', ') ?> | <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?><?php edit_post_link('Edit', ' | ', ''); ?></p>
    
    					<div class="entry">
    						<?php the_content('Read the rest'); ?>
    					</div>
    
    				</div>
    
    <?php endwhile; endif; ?>
    
    <?php } else { // Do stuff specific to non-first page ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post();
    if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    
    				<div class="post" id="post-<?php the_ID(); ?>">
    
    					<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    
    					<p class="postinfo">By <?php the_author_posts_link(); ?> on <?php the_time('M j, Y') ?> | In <?php the_category(', ') ?> | <?php comments_popup_link('No Comments &raquo;', '1 Comment &raquo;', '% Comments'); ?><?php edit_post_link('Edit', ' | ', ''); ?></p>
    
    					<div class="entry">
    						<?php the_content('<strong>Read the rest &raquo;</strong>'); ?>
    					</div>
    
    				</div>
    
    <?php endwhile; endif; ?>
    
    <?php } ?>
    
    				<div class="navigation">
    					<div class="alignleft">
    						<?php posts_nav_link('','','&laquo; Previous Entries') ?>
    					</div>
    					<div class="alignright">
    						<?php posts_nav_link('','Next Entries &raquo;','') ?>
    					</div>
    					<div style="clear:both;"></div>
    				</div>
    
    		</div>
    
    <?php get_sidebar(); ?>
    
    	</div>
    
    <?php get_footer(); ?>

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Why No Images In Blog?’ is closed to new replies.