Community Forums › Forums › Archived Forums › Design Tips and Tricks › Add Specific Header Images to Specific Pages (Outreach)
Tagged: Header Images, outreach
- This topic has 4 replies, 4 voices, and was last updated 11 years, 5 months ago by
Brad Dalton.
-
AuthorPosts
-
August 18, 2013 at 8:54 pm #57259
mheffner
MemberHi Everyone!
I am looking for some thoughts and help to add a specific header image to a specific page. Does anyone have a suggestion on the easiest way to accomplish this? This site is similar to what I am after http://proverbs31.org/speakers/ as it shows the image before the sidebar and content area execute. I think I need about 6 different pages to present different images just above the content/sidebar areas. Any suggestions on the best way to perform this?
I was following these instructions to achieve this but once I started adding the conditional statement I got tripped up http://www.carriedils.com/add-widget-area-below-nav/
I added the widget areas as she suggested and then added a hook shown below to functions.php:
/** Add Hook for Custom Header on Certain Pages through Widgets */
add_action( 'genesis_before_content_sidebar_wrap', 'outreach_header_genesis' );After this I added conditional statements in functions.php to tell it when to put the widget with the header image. You can see on the site it is showing an error in that area.
The first statement is:
// If it's a page with ID 9
// Display Daughters
elseif ( is_page( array(9) ) ) {
genesis_widget_area( 'daughters', array(
'before' => '<div id="cheader"><div class="wrap">',
'after' => '</div></div>',
) );}
Appreciate any help you might be able to offer.
Matt
http://www.greaterimpact.us/August 19, 2013 at 6:04 am #57282AnitaC
KeymasterI used Brad Dalton's instructions to do this for one of my clients and it worked out great.
Need help with customization or troubleshooting? Reach out to me.
September 1, 2013 at 7:43 pm #60171mheffner
MemberThanks Anitac. However, I am after changing the area before the posts and sidebars and not the header image for different pages. Any ideas for this area (just under nav but above the post and sidebar)?
Thanks for your thoughts. Much appreciated.
September 1, 2013 at 9:19 pm #60182dev
ParticipantI'd use multiple Soliloquy sliders, each with one slide, putting one slider on each page. With Soliloquy you can quickly create the sliders and each has a shortcode which you would use on the page. Should be easy as pie, assuming I understand what you are trying to do.
September 1, 2013 at 11:09 pm #60200Brad Dalton
ParticipantYou can do this at least 3 several ways:
1. Add 6 new widgets using the genesis_before_content_sidebar_wrap hook
2. Or hook in multiple images using that hook for the pages you want them to display on using the page slug or i.d's.
3. Another option which is better in my opinion is to create a custom field.
Once you add this code to the end of your child themes functions.php file, you will then need to install the Advanced Custom Fields plugin and create a new custom field named custom_headers and meta box using the plugin.
Here's the process with code for the header http://wpsites.net/web-design/add-unique-header-images-using-custom-fields/
This question has been answered before and resolved using this solution:
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.