I am trying this but it doesn't seem to work
<?php $my_post_meta = get_post_meta($post->ID, 'wpcf-post-youtube-video-id', true); ?>
<?php if ( ! empty ( $my_post_meta ) ) { ?>
<amp-img alt="A view of the sea"
src="hidden link;?php echo get_post_meta( $post->ID, 'wpcf-post-youtube-video-id', true); ?>/hqdefault.jpg"
width="900"
height="675"
layout="responsive">
</amp-img>
<?php } ?>
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Well - I dont think it's a Toolset issue. As when we try to retrieve the data its returning the correct youtube video ID. I suggest you should contact AMP support and check with them what is the correct way to display it using PHP template.
Would you mind helping me out with this since you already have access to my site?
I am sure you can detect the problem fairly quickly.
thanks and regards,
nick
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Sorry but I think I did not explain well. The thing is that this is not a matter or access details but about how AMP is integrated.
As you can already see that the values from custom fields are retrieved successfully and also works at some point but not with the amp shortcodes. We follow the exact syntax as you already know but still its not working. You should consult AMP support for that as this is something that is beyond the scope of our support policy to debug why third party shortcode not working.
Thanks for taking a look into this. I am sure it's just something very simple we missed.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
I do not find any issue related to Toolset here. Sorry. I checked but nothing I see I missed here.
Feel free to close the ticket here.