Community Forums › Forums › Archived Forums › Design Tips and Tricks › Add Full Width Image before content/sidebar with Hook
- This topic has 9 replies, 2 voices, and was last updated 11 years, 3 months ago by Brad Dalton.
-
AuthorPosts
-
August 16, 2013 at 1:48 pm #56875Robby PayneMember
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 #56886Brad DaltonParticipantHow many pages?
There's at least 5 ways to do this.
1. CSS
2. PHP custom function
3. PHP in Simple Hooks
4. Custom Widgets
5. Custom FieldsAdding 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 #57119Robby PayneMemberThanks 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 #57132Brad DaltonParticipantHere'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 #57348Robby PayneMemberThanks 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 #57355Brad DaltonParticipantSimply change the hook position.
Replace
genesis_header
with another hook like
genesis_before_content_sidebar_wrap
Its that easy!
August 19, 2013 at 12:00 pm #57366Robby PayneMemberIt'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 #57370Brad DaltonParticipantOnly 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 #57907Robby PayneMemberWorked like a charm! Thanks again for the help!
August 21, 2013 at 3:51 pm #58035Brad DaltonParticipant -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.