Hi @mairag,
There are several ways to currently input a custom fallback image.
This can however (for now) only be done through using filters; a free extension is planned to add one within the WordPress user interface.
This is the current order of the image callback:
1. Featured image.
2. Fallback filter 1
3. Header image (if theme supports it)
4. Fallback filter 2
5. Site Icon
In 2.8.0 (December~January) this order is planned:
1. Featured image.
2. Fallback filter 1
3. Header image (if theme supports it)
4. Fallback filter 2
5. Theme/Site logo (WordPress 4.5+)
6. Fallback filter 3
7. Site Icon
I believe you’re looking for Fallback filter 2.
This is how the code should look like, where you replace the URL (within the quote marks) with your preferred image location. This URL needs to be a fully qualified URL, so the domain name and “http” need to be included.
add_filter( 'the_seo_framework_og_image_after_header', 'my_social_image_fallback' );
function my_social_image_fallback() {
return 'https://example.com/path/to/my/image.jpg';
}
You can add the code to your theme’s functions.php
file.
I hope this helps :). Cheers!