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 11 months ago.

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

    mheffner
    Participant
    Post count: 6

    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 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/
    #57282

    anitac
    Participant
    Post count: 7032

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

    http://wpsites.net/web-design/different-header-images-css/


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #60171

    mheffner
    Participant
    Post count: 6

    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.

    #60182

    dev
    Participant
    Post count: 451

    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.

    #60200

    braddalton
    Participant
    Post count: 8875

    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 http://wpsites.net/web-design/add-unique-header-images-using-custom-fields/

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


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

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

You must be logged in to reply to this topic.