featured image in post title
-
I’ve been constantly jumping hoops to try and get my wordpress site to the way I want it.
At the moment I am using the “unstandard” theme. I don’t think it’s supported but I had reasons for choosing it.
The problem is I am trying to insert a featured image (or any banner type image) where the title of the post is. Featured images in wordpress are quite confusing. I uploaded a featured image which displays fine on the home page but the same featured image doesn’t display in the post. In some themes this is built in but it’s not built in on my theme. I found code that replaces any text in the title area of the post with the featured image of the post. I thought my problems were solved until the post only displays a portion of the image, which you can see here…
http://www.stevenstallone.com/2013/04/10/diddy-kong-reloaded/
What makes no sense with featured images is that it can somehow display the full image on the homepage and yet somehow display the same image cropped for no reason. I don’t know what to call this, whether it’s a thumbnail or if it’s not a thumbnail any more and it’s now called a featured image. This cropping makes no sense. So I adjusted the size of the thumbnail of the thumbnail? of the picture in the media setting and this does nothing. WordPress is just happy to display the image cropped. Here is the text that was used to replace the title(); in single.php
<h2><?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail (featured image) assigned to it. the_post_thumbnail(); } else { the_title(); } ?></h2>I’ve read through a few solutions, some out of date and this is the closest I’ve got to something working.
What I am looking for ideally is to be able to set the featured image into the title section of the post with or without the title text as well, whether the text be above or below image. Also I’m looking for the ability to put in a custom image/banner into the post title that is completely different to the set featured image that displays on the home page.
I want to have all my avenues of customability sorted just in case down the line I want to put either a title and image, featured image alone, non featured image alone, etc…
Feel free to relax by watching the “Diddy Kong Reloaded” video on my website.
Thanks in advance…
The topic ‘featured image in post title’ is closed to new replies.