[Wordpress] How do I edit this page?

Entertainment

Junior Member
Joined
Apr 23, 2012
Messages
174
Reaction score
19
Hey Guys,
My index page is using the code I have pasted below, and it looks great. However, how can I edit it do rather than displaying posts, it displays pages?
Thanks

Code:
<?php get_header(); ?>


	<?php if (have_posts()) : ?>


		<?php while (have_posts()) : the_post(); ?>
		  
      <?php if(has_post_format( 'gallery' )) { //gallery ?>
        
        <article <?php post_class() ?> id="post-<?php the_ID(); ?>">
          <a href="<?php the_permalink() ?>">
            <?php if ( has_post_thumbnail() ) { the_post_thumbnail('medium-square'); } else { ?>
              <img src="<?php echo get_template_directory_uri(); ?>/img/oops.png" width="200" height="200" />
            <?php } ?>
            <strong><?php the_title(); ?></strong>
          </a>
        </article>
        
        <?php } elseif(has_post_format( 'image' )) { //image ?>


          <article <?php post_class() ?> id="post-<?php the_ID(); ?>">
            <a href="<?php the_permalink() ?>">
              <?php if ( has_post_thumbnail() ) { the_post_thumbnail('medium-square'); } else { ?>
                <img src="<?php echo get_template_directory_uri(); ?>/img/oops.png" width="200" height="200" />
              <?php } ?>
              <strong><?php the_title(); ?></strong>
            </a>
          </article>        
        
      <?php } else { // normal post format ?>


        <article <?php post_class() ?> id="post-<?php the_ID(); ?>">
          <a href="<?php the_permalink() ?>">
            <?php if ( has_post_thumbnail() ) { the_post_thumbnail('medium-square'); } else { ?>
              <img src="<?php echo get_template_directory_uri(); ?>/img/news.png" width="200" height="200" />
            <?php } ?> 
            <strong><?php the_title(); ?></strong>
          </a>
        </article>


      <?php } ?>


		<?php endwhile; ?>


			<ul class="prevnext">
				<li><?php next_posts_link('< Older Entries') ?></li>
				<li><?php previous_posts_link('Newer Entries >') ?></li>
			</ul>


	<?php else : ?>


		<article class="noposts">
			<h2>404 - Content Not Found</h2>
			<p>We don't seem to be able to find the content you have requested - why not try a search below?</p>
			<?php get_search_form(); ?>
		</article>


	<?php endif; ?>


<?php get_footer(); ?>
 
It looks like the wordpres loop (command to insert posts) is intact.. Are you sure you have created posts.. If so go to Settings>Reading in your admin dashboard and make sure that the setting for your front page is set to posts and not a specific page.
 
Entertainment,

Are you saying you want to display the other pages for the site you have built? There should be a way to create a menu from within the backend and make that show up on the home page with all the other pages linked to it.

Here is info on creating a horizontal menu,

http://codex.wordpress.org/Creating_Horizontal_Menus

Sorry if that isn't what you are referring to.

Shawn
 
Back
Top