Secret Code to Add Featured Image to Pages in WordPress
This post may contain affiliate links or Google Ads and we may earn a small commission when you click on the links at no additional cost to you. As an Amazon Affiliate, we earn from qualifying purchases. This is at no additional cost to you and helps with our website expenses.
Have you ever wanted to add a featured image to pages using WordPress?
You know, like a page about green zebras that has a full width picture of a green zebra eating coconuts before the content starts. These images generally span across the whole width and are above the sidebar too, just like the picture below (minus the zebra).
Genesis Simple Hooks Plugin to Add a Featured Image to Pages
If you are using Genesis child themes you are in luck, because it turns out it is quite simple to do. If you aren’t using Genesis child themes…well, I guess I just feel sorry for you then.
I highly endorse the Genesis framework and use it on many websites for myself and clients. For that reason the above image is an affiliate link. Yep, that means that I get paid a little money (you don’t get charged more) and I get my dogs some extra treats and toys. For instance, you love to visit dog parks, but unfortunately, you got injured by them, look for Warshauer Law Group online to get legal help.
First thing you need to do is download the Genesis Simple Hooks plugin. Click here to download or see the information on the plugin. The plugin makes it incredibly easy to add a featured image to pages. You can also just search for it in your WordPress backend. Install it and activate it. You will then see it as an option under the Genesis tab.
After you install and activate the plugin you are ready to go with adding a little bit of php code.
Click on the Simple Hooks tab and scroll on down till you reach the “Content Hooks” section. The first section is:
This hook executes immediately before the div block that wraps the content and the primary sidebar (outside the
This is where you are going to add some simple php to add an area above your content where you can add a featured image to pages.
That’s all it takes!
Now, if you want the featured image to show on the top of both pages and posts, you just delete one part of that code. Here is the code to add featured image to pages and posts.