August 16, 2013 at 1:48 pm #56875
I'd like to be able to add a full-width image after the nav but before the content/sidebar area on this site:
Each page will need a unique picture, so I'm needing the proper code to insert in the page template for each page. I'm OK with registering and adding widget areas for the client to change out these pics, but I'd love to be able to allow them to make these changes via the "Featured Image" for each page. Either way, I just need to know what PHP code to drop into the page template to get it to drop the image up there. Below I will post a mock-up of what I'm going for here...http://affiliatedbaptist.comAugust 16, 2013 at 2:35 pm #56886
How many pages?
There's at least 5 ways to do this.
2. PHP custom function
3. PHP in Simple Hooks
4. Custom Widgets
5. Custom Fields
Adding a new widget for each page could be a problem if there's a lot of pages.
Another option is to use a custom field hooked into the same position. This will enable you to create a custom meta box for a second featured image where they can simply upload the image from any edit screen.
Which solution do you want Robby?
August 17, 2013 at 9:57 pm #57119
Thanks for the reply!
I'm thinking this option:
"Another option is to use a custom field hooked into the same position. This will enable you to create a custom meta box for a second featured image where they can simply upload the image from any edit screen."
This sounds like what I'm going for. Looking forward to your wise advice!August 18, 2013 at 5:41 am #57132
Here's the tutorial. Simply change the hook and conditional tag to suit your needs. http://wpsites.net/web-design/add-unique-header-images-using-custom-fields/
August 19, 2013 at 11:09 am #57348
Thanks for the help! This is close to what I'd like to do, but I don't want to replace the header image. I would like to add a header-type image above the content but below the Navigation. If what you suggested is the way to do that, forgive my ignorance. I have the CSS and HTML stuff down, but I trip all over PHP and hooks. I read the linked article and think this is close to what I'm wanting, I just need to know how to get it to appear above the content, below the nav, and without replacing the main header.
Thanks again for all your help!!!August 19, 2013 at 11:20 am #57355
Simply change the hook position.
with another hook like
Its that easy!
August 19, 2013 at 12:00 pm #57366
It's an XHTML install right now. If I change it over to HTML5, is there anything I need to change with this?August 19, 2013 at 12:07 pm #57370
Only the Loop hooks have changed and the CSS class selectors which the tutorial doesn't include so no changes needed.
August 21, 2013 at 8:03 am #57907
Worked like a charm! Thanks again for the help!August 21, 2013 at 3:51 pm #58035
You must be logged in to reply to this topic.