• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

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!

Authority Pro Theme

Reader Interactions

Comments

  1. Adrianne says

    February 2, 2018 at 2:32 pm

    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

    Log in to Reply
  2. Alfonso says

    December 28, 2017 at 9:13 am

    Hello,
    I followed the method indicated in the post but the image is not the same size as the demo.
    Is it possible to solve this problem?
    Best Regards,
    Alfonso

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.