1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Wordpress] How do I edit this page?

Discussion in 'Web Design' started by Entertainment, Mar 16, 2013.

  1. Entertainment

    Entertainment Junior Member

    Joined:
    Apr 23, 2012
    Messages:
    146
    Likes Received:
    14
    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(); ?>
    
    
    
     
  2. MrDarksid

    MrDarksid Newbie

    Joined:
    Dec 18, 2011
    Messages:
    21
    Likes Received:
    2
    Home Page:
    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.
     
  3. Endire

    Endire Elite Member Premium Member

    Joined:
    Mar 27, 2012
    Messages:
    1,756
    Likes Received:
    1,061
    Gender:
    Male
    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
     
  4. Mutikasa

    Mutikasa Power Member

    Joined:
    May 23, 2011
    Messages:
    575
    Likes Received:
    212