Reply To: Center Post/Page title only if featured image set

Home Forums Support Center Post/Page title only if featured image set Reply To: Center Post/Page title only if featured image set

#158738
Hans Christian Siller

Tom,

thanks for your suggestion! You are correct – the + selector correctly centers the H1 text only if it is preceded by a featured image.

However, your code had the wrong class in it (at least for my install). It looks like I need to use .page-header-image-single instead of .generate-page-header

Here’s the CSS that works (center Post/Page title only if a featured image exists):

.page-header-image-single + .entry-header {
    text-align: center;
}

Thanks for your help – everything is working great now!