WordPress.org

Ready to get started?Download WordPress

Forums

Page.php over Index.php (1 post)

  1. Silvatine
    Member
    Posted 6 years ago #

    I installed WordPress a while ago and have been playing around with the themes. I wanted to create a theme but since I was relatively new to WP, I just took the coding from the default theme and manipulated it. Somewhere along the line I must've done something wrong, because every time I load my website, the page.php template is loaded instead of my index.php.

    My index.php:

    <?php get_header(); ?>
    
    <p class="header">Welcome
    
    To <i>Emergence of Delivery</i>, the official website and blog of the Youth Group of the Statesville Hmong Alliance Church.
    
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<p class="header"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
    
    				<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    
    				<div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				</div>
    
    				<p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
    
    			</div>
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.
    
    		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    And my page.php:

    <?php get_header(); ?>
    
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div class="post" id="post-<?php the_ID(); ?>">
    		<p class="header"><?php the_title(); ?>
    
    			<div class="entry">
    				<?php the_content('<p class="serif">Read the rest of this page &raquo;
    '); ?>
    
    				<?php wp_link_pages(array('before' => '<strong>Pages:</strong> ', 'after' => '
    ', 'next_or_number' => 'number')); ?>
    
    			</div>
    		</div>
    		<?php endwhile; endif; ?>
    	<?php edit_post_link('Edit this entry.', '', '
    '); ?>
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    Any help would be greatly appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic