How to unlink featured image from Genesis – Featured Page widgets

In Genesis WordPress Facebook group, a user asked:

Hi everyone. On Genesis Featured Page, how can I disable link to page from featured image? I’m using Atmosphere Pro.

Custom Genesis – Featured Page Widget plugin can be used for this. Here’s how.

Step 1

Install and activate Custom Genesis Featured Page Widget plugin.

Step 2

Edit the plugin’s class-custom-featured-page.php.

Change

printf( '<a href="%s" class="%s" %s>%s</a>', get_permalink(), esc_attr( $instance['image_alignment'] ), $role, wp_make_content_images_responsive( $image ) );

to

printf( '<div class="%s" %s>%s</div>', esc_attr( $instance['image_alignment'] ), $role, wp_make_content_images_responsive( $image ) );

Step 3

Add the following in child theme’s style.css:

div.alignleft {
    margin: 0 24px 24px 0;
}

div.alignright {
    margin: 0 0 24px 24px;
}
This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.