Echo page thumbnail URL
Permalink 1 user found helpful
I'm in process of adding some dynamic schema markup to my website.
So far, I've managed to dynamically include everything for the particular schema type.
I'm struggling to echo the URL of the page thumb.
Could anyone please advise how to do this please?
So far, I've managed to dynamically include everything for the particular schema type.
I'm struggling to echo the URL of the page thumb.
Could anyone please advise how to do this please?
You can find the required code on this cheatsheet:
https://github.com/shahroq/whale_c5_cheat_sheet#get-a-page-attribute...
https://github.com/shahroq/whale_c5_cheat_sheet#get-a-page-attribute...
Thank you for the link. Actually, I've been searching for this http://aolsigninhelp.com solution on the whole forum.
Thanks again.
Thanks again.
//Define variable for Thumbnail Image $img = $c->getAttribute('thumbnail'); <?php if ($img !== null) { echo ($c->getAttribute('thumbnail')->getVersion()->getURL()); } else { echo 'backup-image-url.jpg'; } ?>