This tutorial provides the code which enables you to display featured images on single pages exactly the same as they’re displayed on single posts when using the Authority Pro child theme by StudioPress.
There’s 3 steps :
Step 1 : Go to authority-pro > lib > featured-images.php and modify line 44 like this :
if ( $add_single_image && $image && is_singular(array( 'post','page' ) ) ) {
Step 2 : Go to authority-pro > lib > featured-images.php and modify line 62 like this :
if ( $add_single_image && is_singular(array( 'post','page' ) ) && genesis_get_image() ) {
Step 3 : Add the following CSS to the end of the Authority Pro themes style.css file and clear caching :
.page.has-featured-image .site-inner {
padding-top: 20px;
}
.page.has-featured-image .authority-featured-image::before,
.single .authority-featured-image::before {
height: calc(100% + 45px);
}
.sidebar-content.page.has-featured-image .authority-featured-image::before,
.sidebar-content.single .authority-featured-image::before {
left: auto;
right: 0;
}
.page.has-featured-image .sidebar .widget:first-of-type {
margin-top: -60px;
}
@media only screen and (max-width: 1075px) {
.page.has-featured-image .sidebar .widget:first-of-type {
margin-top: 0;
}
}
That’s it!
Was This Tutorial Helpful?