Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 95894

dpuk44 on "Change image header in theme help"

$
0
0

Hey this is my first post. OK so I have this site and it has a portfolio page. The header image on the main page is different to the header image on the individual portfolio pages. How can I get the sub portfolio pages to have the same header image as the main portfolio page?

Main page
http://nurdit.com/rachelanderson/?page_id=148

Sub Pages
http://nurdit.com/rachelanderson/?portfolio=aeropress-branding-and-print-design

header.php

<body id="index" <?php body_class(); ?>>

    <!-- wrapper -->
    <div id="wrapper">

        <!-- setup vars -->
        <?php
            $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
            $header = get_option( 'refinery_header' );
        ?>
        <!-- /setup vars -->

        <!-- header -->
        <?php if ( $featured_image || $header['image'] ) : ?>
            <header id="header" role="header">

                <!-- custom header -->
                <?php if ( $featured_image && ! is_single() && ! is_home() && ! is_archive() && ! is_search() ) : ?>
                    <div id="header_image" style="background: url(<?php echo $featured_image[0]; ?>) top center no-repeat;"></div>
                <?php else : ?>
                    <div id="header_image" style="background: url(<?php echo $header['image']; ?>) top center no-repeat;"></div>
                <?php endif; ?>
                <!-- /custom header -->

Viewing all articles
Browse latest Browse all 95894

Trending Articles