WordPress.org

Ready to get started?Download WordPress

Forums

Attitude
[resolved] exclude header image from business template (3 posts)

  1. der_loeffel
    Member
    Posted 1 year ago #

    hey all,
    first of all, I would like to say that I really love your theme!
    Its all I need to display my photos in a simple, minimal but really nice way.
    My home page is realized with a business template, I display a slider with a few images there. For the other pages I would like to use header images (randomly).

    My problem is now:
    Can is exclude the business template from displaying header images?
    At the moment, two "boxes" with images (the header image and the slider) are displayed at the front page, which doesn't look very nice.

    Is there a way to solve this?

    regards,
    lukas

  2. der_loeffel
    Member
    Posted 1 year ago #

    I already found it!

    Just changed the

    <?php $header_image = get_header_image();
    			if( !empty( $header_image ) ) :?>
    				<img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
    			<?php endif; ?>

    to

    <?php if( !is_page('page-ID') ) :?>
    	<?php $header_image = get_header_image();
    			if( !empty( $header_image ) ) :?>
    				<img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
    			<?php endif; ?>
    	<?php endif;?>

    Thank you!

  3. der_loeffel
    Member
    Posted 1 year ago #

    would be nice to have such an option in the config menu anyway :)))

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic