Twitter Card is working; however, doesn't show the featured image?


My Twitter Card is working just fine; however, it’s choosing other images from my posts. Is there a way to ensure that it will use the featured image?


You failed to provide a link. Always provide a link, so people won’t have to go hunting for one. Increases your chances for helpful replies. Or not. :slight_smile:

Having said that, I did have a look at your timeline. Your problem is that your pages have a dozen (!) images designated for twitter cards instead of just one. Try using just the one you want to show up.


We noticed this about two weeks ago - the images on our photo and gallery cards are sometimes right and sometimes wrong. You can look at a card, it will display correctly, refresh the page and then the card shows the wrong image (one from a previous card), refresh the page again and then its correct, so on and so on.


Sorry for not leaving a link and for taking so long to say thank you.

My next problem is that I didn’t set this to happen. There is a setting within my Wordpress SEO for Twitter Cards. Previously, I hard coded it in and it worked; however, I had a tough time doing it this time around. Then I saw the setting and took the easy way out. Is there a way to reverse this?

I’m guessing this is the coding that is associated with the Twitter Card feature on WP SEO. I’m just not sure what to do with it? :

function wpseo_frontend_init() {
$options = get_wpseo_options();
require WPSEO_PATH . ‘frontend/class-frontend.php’;
if ( isset( $options[‘breadcrumbs-enable’] ) && $options[‘breadcrumbs-enable’] )
require WPSEO_PATH . ‘frontend/class-breadcrumbs.php’;
if ( isset( $options[‘twitter’] ) && $options[‘twitter’] )
require WPSEO_PATH . ‘frontend/class-twitter.php’;
if ( isset( $options[‘opengraph’] ) && $options[‘opengraph’] )
require WPSEO_PATH . ‘frontend/class-opengraph.php’;