Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $gtin = get_post_meta(post_ID,'gtin',true);
- ?>
- <script type="application/ld+json">{
- "gtin13:"<?php echo $gtin;?>"</script>}
- "gtin13:"1112223334"
- <?php
- function check_gtin(){
- $gtin=get_post_meta(post_ID,'gtin',true);
- if ($gtin!=''){
- echo '$gtin13:$gtin';
- }else{
- echo 'identifier_exits:false';
- }
- }
- ?>
- <script type="application/json+ld">{
- "<?php check_gtin();?>"</script>}
- "gtin13:$gtin"
- "gtin13:1112223334"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement