Add Specific Header Images to Specific Pages (Outreach)

Community Forums Forums Design Tips and Tricks Add Specific Header Images to Specific Pages (Outreach)

This topic is: resolved

This topic contains 4 replies, has 4 voices, and was last updated by  braddalton 2 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #57259


    Hi 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 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

    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.



    I used Brad Dalton’s instructions to do this for one of my clients and it worked out great.



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



    I’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.



    You 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

    This question has been answered before and resolved using this solution:

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.