Secret Code to Add Featured Image to Pages in WordPress

Don't be shy. Share this to the world!

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).

add featured image to pages

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.

Genesis Framework for WordPressI 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:

genesis_before_content_sidebar_wrap Hook

This hook executes immediately before the div block that wraps the content and the primary sidebar (outside the #content-sidebar-wrap div).

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.

Genesis Simple Hooks
Copy and paste the below code into that section:

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.

Don't be shy. Share this to the world!
Posted in:
Tagged with:

Elizabeth Crane

As an owner of Ranking Edge, Elizabeth Crane oversees all projects and designs and develops websites. She specializes in (and loves) everything WordPress. Her childhood included not wearing a helmet, drinking from the hose, not wearing a seat belt, and playing in the neighborhood streets. And yes, she is still alive.

Leave a Comment