How do I define post titles as images using Custom Fields?
-
Hi,
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:
https://www.ads-software.com/support/topic/unique-header-image-for-each-post1. 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:https://letthemstare.com/wp-content/themes/manifest_v1.1/images/153.jpg
https://letthemstare.com/wp-content/themes/manifest_v1.1/images/156.jpg2. Under header.php <head>, I’ve added the following:
[Code moderated as per the Forum Rules. Please use the pastebin]
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 pageI 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,Kfir Silis
- The topic ‘How do I define post titles as images using Custom Fields?’ is closed to new replies.