Title: redelement's Replies | WordPress.org

---

# redelement

  [  ](https://wordpress.org/support/users/redelement/)

 *   [Profile](https://wordpress.org/support/users/redelement/)
 *   [Topics Started](https://wordpress.org/support/users/redelement/topics/)
 *   [Replies Created](https://wordpress.org/support/users/redelement/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/redelement/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/redelement/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/redelement/engagements/)
 *   [Favorites](https://wordpress.org/support/users/redelement/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [how to customize the posts page to display both content and posts?](https://wordpress.org/support/topic/how-to-customize-the-posts-page-to-display-both-content-and-posts/)
 *  [redelement](https://wordpress.org/support/users/redelement/)
 * (@redelement)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/how-to-customize-the-posts-page-to-display-both-content-and-posts/#post-1165518)
 * whoops, typed a little fast. Here is the corrected code.
 *     ```
       <?php if(is_home()) : ?>
                 //what I want to say on my blog
       <?php else :
             if (have_posts()) :
       	while (have_posts()) : the_post();
       	    the_content();
       	endwhile;
              endif;
       endif; ?>
       ```
   
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Different picture on different pages using custom fields?](https://wordpress.org/support/topic/different-picture-on-different-pages-using-custom-fields/)
 *  [redelement](https://wordpress.org/support/users/redelement/)
 * (@redelement)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/different-picture-on-different-pages-using-custom-fields/#post-1035571)
 * I worked up some quick code so it may be buggy as I haven’t tested it. You’ll
   have to use the custom fields to set the images by page number.
 *     ```
       <?php
          $thereisimage = get_post_meta($post->ID, image, true);
          $page = (get_query_var('page')) ? get_query_var('page') : 1;
   
          if ($page == 1) { ?>
             <img src="<?php echo get_post_meta($post->ID, image1, true); ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>"/>
          <?php } elseif ($page == 2) { ?>
             <img src="<?php echo get_post_meta($post->ID, image2, true); ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>"/>
          <?php } elseif { ?>
             <img src="<?php echo get_post_meta($post->ID, image3, true); ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>"/>
          <?php } else { ?>
             <img src="<?php bloginfo('url'); ?>/default.jpg" alt="Default Image" />
       <?php } ?>
       ```
   
 * To explain, you set you’re thereisimage variable the the page variable. If the
   user is on page 1 it displays the image with the image1 key, if page two the 
   image2 key and so on and so forth until it runs out of pages or keys, then it
   displays the default code.
 * Hope this helps.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [how to customize the posts page to display both content and posts?](https://wordpress.org/support/topic/how-to-customize-the-posts-page-to-display-both-content-and-posts/)
 *  [redelement](https://wordpress.org/support/users/redelement/)
 * (@redelement)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/how-to-customize-the-posts-page-to-display-both-content-and-posts/#post-1165517)
 * I’ve also done some looking around and think you’re correct for you particular
   case. It wouldn’t help me and you may decide to do something similar so I’m also
   going to post my solution.
 * I needed the page text to show in the header and didn’t want to call a seperate
   header for the blog page so I used the following code:
 *     ```
       <?php if(is_blog()) : ?>
                 //what I want to say on my blog
       <?php else :
             if (have_posts()) :
       	while (have_posts()) : the_post();
       	    the_content();
       	endwhile;
              endif;
       endif; ?>
       ```
   
 * It checks to see if the user is on the blog page and shows the hard-coded text
   I wanted on my blog. If the user is on any other page I just display the loop
   to show the text I set in the admin section.
 * I hope this helps.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Different picture on different pages using custom fields?](https://wordpress.org/support/topic/different-picture-on-different-pages-using-custom-fields/)
 *  [redelement](https://wordpress.org/support/users/redelement/)
 * (@redelement)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/different-picture-on-different-pages-using-custom-fields/#post-1035563)
 * do you want a different image for every post or every page?

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