Featured image static home page (incorrect structured data)
-
The front-page featured image (static home page) is being displayed but another image (in fact the featured image from the 1st blog post) is being specified in the structured data.
I think this comes down to the issue that the html and css for the static front-page is different to the normal single.php being used for all other pages – see github
Also see github about this
class-amp-post-template.php
You will see it is running this function twice – get_post_image_metadata() . The first time it sets the image incorrectly and on the second run through it gets it right but it is too late. The url for the ImageObject has already been set. It is the same problem for the structured person data too. Basically static front-pages are running things twice.
- The topic ‘Featured image static home page (incorrect structured data)’ is closed to new replies.