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 -->
darn, code strips the script… here’s an img of the code
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
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.