Conditionally display featured image on singular posts and pages

Description: Easily control the visibility of the featured image on singular posts and pages–while keeping it visible in archive pages, query loops, and other list views. (By request.)

Creator’s site: Conditionally display featured image on singular posts and pages by Cyrill Bolliger

Why you might want it:

By default, a featured image is automatically displayed on a page or post.

In the Illinois Theme, you can select whether you want the image positioned left, right, or center, but as of this writing, you can’t choose to hide it in order to place it in a different location, such as an author’s photo in a biography box at the end of a news article.

How to use:

  1. (Available by request:) Send a request to have this plugin enabled on your publish.illinois.edu site.
  2. After the PIE administrators have turned on the plugin for you, go to your Dashboard‘s Plugin list and choose Activate.
  3. Once the plugin is active, you’ll have a new item in your pages’ Featured Image section: A small checkbox displayed below the Featured Image which allows you to hide the Featured Image within the page or post itself.
  4. After you’ve checked the box and saved your page or post, the Featured Image will continue to be displayed in groupings like Categories, Tags, or the Content View plugin’s filtered page or post groups. However, it will not be automatically displayed within the page or post itself, so you can choose where (or whether) you want to place that image.

Examples

The post management sidebar of a Block Editor post, with the Featured Image and the conditional checkbox:In the Post tab of a WordPress Block Editor post, the featured image of a Pallas cat is followed by an unchecked checkbox and the text "Display featured image in post lists only, hide on..."

The Featured Image in a Classic Editor tends to appear in a pod on the right hand side:
The Featured Image controls in a Classic Editor post, showing an image and the conditional checkbox

The standard display of that post, with the box not checked:

Without the box checked, the Featured Image defaults to appear on the left.

After checking the box, the Featured Image is still attached to the page in category and other group views, but it doesn’t automatically appear on the page. This gives you full page width content and the ability to choose where (or if) you want to embed the featured image.

With the checkbox checked, the image does not automatically appear inside the page itself. You can choose where to place a copy.

 

 

Demonstration of Publish.illinois.edu Plugins
Email: dlstrong@illinois.edu