• 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 Fallback Featured Image For Jetpack Sharing

This PHP code, written by one of the Jetpack plugin Developers, enables you to display a fallback image which is shared to the social accounts you configure in the plugin settings.

Simply change the URL in the code to your fallback image which will be used if you don’t add a featured image or your post doesn’t contain any images.

Note: Different social networks may impose a size limit on images so i suggest you keep them at least 200px x 200px.

Testing On Local Host

If you want to test out any code using Jetpack on your local installation of WordPress, you can choose from 2 options which enable you to activate the plugin locally.

Add this line to a plugin or in your child themes functions file.

add_filter( 'jetpack_development_mode', '__return_true' );

Or add this line to your wp-config.php file.

define ('JETPACK_DEV_DEBUG', true);

Other Options

A more complete solution would be to add a fallback image for featured images. The solution for this and the methods available vary per theme.

Image from Images Folder

Use image from child themes images folder as fallback for featured image when none added:

Register for full access

Related Code Snippets

  • Code To Set Genesis Default Featured Image

Reader Interactions

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