Simple Hooks… Conditional header info

Community Forums Forums Design Tips and Tricks Simple Hooks… Conditional header info

This topic is: not resolved

This topic contains 3 replies, has 1 voice, and was last updated by  Tal 1 year, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #50162

    Tal
    Participant
    Post count: 21

    I’m using Genesis Simple Hooks to set page banners that use the WP featured image to display a background image in the site header banner (so there are different images depending which page you’re on).

    This is set in the “genesis_before_header ” section of simple hooks.

    What I need to do now, is apply this ONLY to pages and not posts – can someone help me come up with the code required to achieve this?

    The code I’m using is …


    <!-- Use page featured image as the page banner -->
    <?php $image_id = get_post_thumbnail_id(); ?>
    <?php $image_url = wp_get_attachment_image_src($image_id,'small'); ?>
    <div id="featured-header">" alt=""></div>
    <!-- end banner image -->

    #50163

    Tal
    Participant
    Post count: 21

    darn, code strips the script… here’s an img of the code

    Header Code

    #50166

    Tal
    Participant
    Post count: 21

    Hate not being able to edit posts when I think of something more to add.

    For posts – I will want to set a default image for the “featured-header” div instead of using the featured image

    #50322

    Tal
    Participant
    Post count: 21

    *bump*

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

You must be logged in to reply to this topic.