Displaying summary card instead of large image summary card


#1

Issue: Twitter is displaying summary cards instead of large image summary cards. I have the large image summary card code saved in my header.php file, and can see that code on the desired pages, but there is also a summary card code appearing that I cannot locate that seems to be trumping the large image code.

URL affected: All WordPress “post” URLs on my site are affected, however, here is an example: http://milehighsports.com/rockies-adding-another-all-star-ahead-of-trade-deadline/

Troubleshooting steps tried already: I’ve searched every php file for the code and cannot find it. I’ve had my developer/support look for the code as well, and they cannot find it.

We believe it is tied to the Twitter plugin. We recently deactivated the Yoast SEO plugin and had to activate the Twitter plugin in order for cards to appear. (Cards were appearing prior to using either Yoast or Twitter plugin, simply by having the card code in the header.php file.)


#2

Yes, that would be the correct conclusion. The Twitter plugin adds card markup for you. If you’re not using the other features of the plugin you could disable the plugin if you’ve already added the large summary card markup in your headers. I’ve not used the plugin for a while so I’m not sure if there’s a configuration option to disable the card markup insertion.


#3

Also, note that in your header file, you’re providing empty values for card title, description and image - that will not validate, so no card will appear.


#4

Thanks for the quick reply Andy. Forgive my ignorance, but what values would need to be added in the header file in order to deactive the Twitter plugin? We had that code in there, as is, prior to having either the Yoast SEO or Twitter plugins active and it worked just fine. However, after deactivating the Yoast plugin to improve site speed, it stopped working and we had to add the Twitter plugin to get cards to start working again.


#5

I suspect Yoast was putting in valid card data for you, then you removed / deactivated it and the 3 invalid fields in your header were not allowing cards to be rendered, then you installed the Twitter plugin and it filled in those values but also overrode the card type.

You can either remove those lines from your header and configure the Twitter plugin for summary large image cards (which I think is possible, but I’ve not confirmed); or, deactivate the Twitter plugin in Wordpress settings, and fix your header to supply valid values for title, description and image.


#6

Thanks. I’m not seeing any way to configure the Twitter plugin. What changes would I need to make to the header?


#7

Thanks. I’m not seeing any way to configure the Twitter plugin.

The code in the header hasn’t changed from when it was working prior to Yoast being installed, so I’m not sure why I stopped working when the plugin was deactivated.

What changes would I need to make to the header?


#8

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.