Hello,
You don’t see the image because WPMM uses a custom template for the maintenance mode page, and the SEO plugins have no idea about how to embed the image in that custom template.
The only way to add a social preview image is to add the meta tags programmatically.
Disclaimer: do not try if you are just a basic WordPress user.
add_filter('wpmm_status_code', function($http_code) {
if(!empty($_SERVER['HTTP_USER_AGENT']) && stristr($_SERVER['HTTP_USER_AGENT'], 'twitterbot')) {
return 200;
}
return $http_code;
}, 10, 1);
// you have to change twitter:title and twitter:image values
add_action('wpmm_head', function() {
print('<meta name="twitter:card" content="summary_large_image" />');
printf('<meta name="twitter:title" content="%s" />', esc_attr('here should be a title'));
printf('<meta name="twitter:image" content="%s" />', esc_url('here should be the url of the social preview image'));
}, 10, 1);
Add the code to the end of functions.php (a file that can be found in your active theme folder).
—
George
-
This reply was modified 5 years, 9 months ago by
George J.