• I would like to set 1 image for all posts as the header image for the posts (updates) page on my site. Also, I would like the site title (the logo) to maintain, instead of the post title.
    Currently, when I click on a post, it loads the page with the featured image as the header image, and the post title instead of the site title.
    Website is newglobal.aalto.fi
    I need the featured image for the plugin I’m using to get the posts to appear in a grid.
    About the title:
    I’ve tried some different things, managed to take out the author and arrow from the header image on posts, but can’t figure out where to change the title.

Viewing 1 replies (of 1 total)
  • sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hi there, to have the same image as a header image on all posts, you can use the following CSS and then replace URL_OF_IMAGE between the quote marks with the image you wish to use as the header image on single post pages.

    .site-header {
        background: url("URL_OF_IMAGE") no-repeat scroll center center / cover rgba(51, 71, 61, 0.05);
    }

    To have the site title image/description to show on single post pages, you will need to add sidebar-single.php to your child theme and then edit that file so that it looks like this:

    <?php
    /**
     * The Sidebar containing the main widget areas.
     *
     * @package Bushwick
     */
    
    the_post();
    ?>
    <header id="masthead" class="site-header" role="banner">
    	<div class="site-branding">
    		<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    		<p class="site-description"><?php bloginfo( 'description' ); ?></p>
    	</div>
    </header><!-- #masthead -->
    
    <?php
    rewind_posts();

    Note there is a blank line below rewind_posts()

    What I did was to open sidebar-index.php and copy out the <header> section and replace the post title stuff that was in sidebar-single.php.

Viewing 1 replies (of 1 total)
  • The topic ‘change post header and title for posts to standard’ is closed to new replies.