Tony asked this question awhile ago on the StudioPress community forums:
Is it possible to add a full-width featured image under the primary navigation bar in the Apparition theme home page.
There’s at least 2 options you can choose from.
- You can hook in the image from your images folder using the genesis_after_header hook.
- Or you can hook the image using the genesis_before_content_sidebar_wrap hook
Lets look at the first 2 solutions i tested locally on the Apparition child theme by StudioPress.
Using The After Header Hook
This solution results in a full width image displaying immediately after your primary nav menu and doesn’t require any additional CSS code.
The code pulls the image from your child themes images folder.
And here’s the code which goes in your functions file.
Using The Before Content Sidebar Wrap Hook
This solution only displays your image the width of the header and requires a small amount of CSS be added to your child themes style.css file to remove the gap which you’ll see after adding the PHP code.
And here’s the PHP code which goes in your functions file and the CSS for your style.css file.
Note: All PHP code should be copied from the view raw link in the Gist. The CSS classes used in this tutorial assume you’re using the XHTML version of the Apparition theme and haven’t converted it to HTML 5 markup.
- You could also create a new widget and hook it to either of these 2 hooks
- Or you could hook in a featured image from any post.