1

I've tried to follow a guide that explain how to do so but failed and I don't know why it doesn't work.

The guide: http://wordpress.org/support/topic/unique-header-image-for-each-post

  1. In my posts (WP GUI), I've added a custom field named 'PostTitle'. The value of these Posts are 153 & 156 as the post IDs numbers. Furthermore, I've uploaded two title pictures to my theme images directory:

  2. Under header.php , I've added the following:

    ID, $myfield, true); ?>

    .entry-title {
        border:none;
        color:black;
      <?php
      if($postimage) { 
      ?>
        background-image: url('http://letthemstare.com/wp-content/themes/manifest_v1.1/images/<?php echo $postimage; ?>.jpg');
      <?php
      } elseif(!$postimage) { 
      ?>
        background-image: none;
      <?php
      }
      ?>
    }
    

  3. Post titles images load to each post title individually but:

a. Images doesn't replace original text title b. Images are shown only within posts and not on the main page c. I'm not sure that the images will function as a link on the main page

I choose entry-title according to the following code in index.php:

<?php while (have_posts()) : the_post(); ?>

  <h3 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>

When I mask this line, the post titles on the main page disappear. Furthermore, on style.css h3 represents the post titles:

h3 {
  margin-bottom: 5px;
  font-size: 2.3em;
  font-weight: bold;
  text-align: left;
}

I'm afraid that I have a mistake in the title class but I don't know what it is and how to fix it. Kindly assist me in fixing the issues above. Your support would be most appreciated.

Thanks in advance!

1 Answer 1

1

That's a very old tutorial.

Since version 2.9, WP comes with post thumbnails built in:

http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.