Categories
Free Tutorials Genesis Tutorials

Add Authority Pro Featured Images on Single Pages

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!

2 replies on “Add Authority Pro Featured Images on Single Pages”

Just a heads up bc I’m not sure WHY this happened but I found that my site was pulling in a “featured image” on the home page (that wasn’t actually set, it was some code ghost from when I previously built the home page on Beaver Builder). I got rid of it by adding && ! is_front_page() to the end of Line 44 code in case anyone else runs into that issue

Leave a Reply

Your email address will not be published. Required fields are marked *