• roger85

    (@roger85)


    I themed my own wordpress yesterday and now posts won’t show on my index.php. It only shows the not found message and a search box.

    this is the code i use.

    <?php if (have_posts()) : ?>
    
    				<?php while (have_posts()) : the_post(); ?>
    
    				<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    				<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    
    				<?php the_content('Read the rest of this entry &raquo;'); ?>
    
    				<p><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
    				</div>
    
    				<?php endwhile; ?>
    
    				<?php next_posts_link('&laquo; Older Entries'); ?> | <?php previous_posts_link('Newer Entries &raquo;'); ?>
    
    				<?php else : ?>
    
    				<h2>Not Found</h2><br />
    
    				<p align="center">Sorry, but you are looking for something that isn't here.
    
    				<?php get_search_form(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter roger85

    (@roger85)

    Somebody please help. It seems like nothing inside the while tag will show up.

    If I switch to the default theme, my posts are there. If I use my own theme, it’s not showing…

    iridiax

    (@iridiax)

    Do you have any other loops or queries in your custom theme?

    Thread Starter roger85

    (@roger85)

    Oh, yeah, i have one on my sidebar that queries the latest posts. I removed it and now it works.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Posts not showing on custom theme’ is closed to new replies.