Site logo

Archived topic

Default blog post header

3 replies · Started by BarnaB on January 17, 2017

Viewing posts 1–4 of 4

Hi,

Is it possible OR how can I achieve a default blog posts header with:

default background (a small 1kb png repeated)and post title as H1 aligned to center?

http://prnt.sc/dwpzim

But it would be default to all blog posts....

thanks

GP Hooks would be your best bet. Something like this in the After Header hook:

<?php if ( is_single() ) : ?>
    <div class="posts-hero-area">
        <?php the_title(); ?>
    </div>
<?php endif; ?>

Then your CSS:

.posts-hero-area {
    background-image: url('URL TO YOUR IMAGE');
    background-repeat: repeat;
    padding: 7% 0;
    text-align: center;
    color: #FFF;
}

Thank you, it worked amazingly well. One more thing if I may ask...how to add a category meta below the title? If not possible not an issue :)

< h1 > big 36px title text < /h1 >
< h4 > smaller 20px category < /h4 >

Thank you

This archived topic is closed to new replies.