A member is getting a fatal error that is linked to post thumbnails. In this session we show how to add WordPress thumbnail support to Thesis to fix the problem. We give the line of code needed to put in your custom_functions.php file that will tell WordPress that you’re using WordPress thumbnails even if you aren’t. We also discuss use of the WordPress featured image function.
Okay well obviously, I spoke with you last Wednesday…
And having been away, I haven’t had much time to get things moving but I have installed the business directory listing sort of plugin that you kindly let me have onto my site. Also added the Custom Press plugin as well and keep getting this fatal error which is linked with post thumbnails which having switched away from Thesis to just do any of the theme seem to disappear and then only come back again when I switch Thesis back on again.
Right. What we need to do is add thumbnail support manually to your custom functions.php file so that it doesn’t throw that error. Are both plugins throwing the error or is there one in particular?
It’s just showing as directory at the moment but whether if we solve that, it would then show it under the Custom Press as well. I don’t know. It just basically says wp-content/plugin/directory/call/call.phponline1154.
Yeah okay. What we want to do here is add theme support for post thumbnails. Have you played around with your custom functions.php file at all?
I haven’t much with… I have other Thesis blogs before I came across all your series and your plugins. So I’m familiar with it and accessing it via FTP but not on this particular site because I hadn’t needed to yet.
Okay so what we’re going to do is I’m going to give you the line of code that you need here to do this and since you’re familiar with your custom functions.php file, you’ll know how to put it in because all you have to do is just put this in somewhere in your custom functions.php file. If you haven’t done anything with it yet then it’s the first thing after the introductory comment. What this does is this isn’t going to affect Thesis in any way but what it will do is, it will essentially tell WordPress that you’re using the WordPress thumbnails even though you aren’t and that should get past that error.
So I’ll just wait for my code editor to come all the way up here.
I’m going to go straight ahead and add this to the actual site directly because I’ve got nothing else in there. So if it goes wrong, I can always just upload a clean custom functions file.
I’ll paste it in the chat window for you once I’ve done this. What we’re doing is let’s see, we’re going to add theme support. Now, for those of you who are just visiting here today, this might sound like a very technical question and actually, we answer all kinds of questions on Wednesdays. Thursdays are just beginner level questions. But today, this is really a code question and we do have a code fix for it.
Okay and then post thumbnails. Let’s just make sure that’s the exact right syntax, yes post thumbnails. Okay so this is the line of code, add theme support, post thumbnails. Take that in your custom functions.php file and that error should go away. Are you going to do that right now and we’re going to look and see that it does?
Okay. So while you’re at it, while you’re doing that, I’m just going to make you the presenter.
Okay, can you see that?
Alright so it doesn’t look like anything different in your chat window.
Yeah, just go ahead and…
If I save that and let’s refresh my listing page and see what happens. There we go. That’s a good start, isn’t it?
Yeah, even though…
Fantastic. So I can have a…
I mean, why don’t you go to one of your pages or posts, look at the edits, go to the page or post edit screen.
One of the listing ones, I presume.
No, one of the actual pages or posts.
Oh okay, let’s go to a page. Do you mean within the edit screen or actually on the main page?
Yeah, within the edit screen. Go ahead and click on just one of those edit pages. I want to see what the dialog looks like now that you’ve added post thumbnails. Okay, see that little black box down there where it says Featured Images in the lower right hand corner?
Okay so now Thesis doesn’t use a featured image. But because we added that post thumbnails, you have this new dialog that says featured image. On your listing pages, when you go ahead and do those listings, that’s where you’re going to create the image for the listing is using that featured image.
Right okay, because at the moment, while I was doing the test within the listing section, I wasn’t sure how the image is going to arrive. So I actually embedded it in for now, you can see I’ve popped a logo there.
So basically, I need to change it, move it down to the bottom down here.
Well,at least you should try it. Yeah.