Add Full Width Image before content/sidebar with Hook

Community Forums Forums Design Tips and Tricks Add Full Width Image before content/sidebar with Hook

This topic is: not resolved

Tagged: , ,

This topic contains 9 replies, has 2 voices, and was last updated by  braddalton 11 months, 1 week ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #56875

    Robby Payne
    Participant
    Post count: 12

    I’d like to be able to add a full-width image after the nav but before the content/sidebar area on this site:

    http://affiliatedbaptist.com

    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.com
    #56886

    braddalton
    Participant
    Post count: 8873

    How 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 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?


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #57119

    Robby Payne
    Participant
    Post count: 12

    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!

    #57132

    braddalton
    Participant
    Post count: 8873

    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/


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #57348

    Robby Payne
    Participant
    Post count: 12

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

    #57355

    braddalton
    Participant
    Post count: 8873

    Simply change the hook position.

    Running XHTML or HTML 5.

    Replace [php]genesis_header[/php] with another hook like [php]genesis_before_content_sidebar_wrap[/php]

    Its that easy!


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #57366

    Robby Payne
    Participant
    Post count: 12

    It’s an XHTML install right now. If I change it over to HTML5, is there anything I need to change with this?

    #57370

    braddalton
    Participant
    Post count: 8873

    Only the Loop hooks have changed and the CSS class selectors which the tutorial doesn’t include so no changes needed.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #57907

    Robby Payne
    Participant
    Post count: 12

    Worked like a charm! Thanks again for the help!

    #58035

    braddalton
    Participant
    Post count: 8873

    No worries.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

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

You must be logged in to reply to this topic.