/ Published in: PHP
This example for meta tags
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $taxonomyID = get_queried_object()->term_id; //$metaname=get_field('meta_name', 'product_cat_' . $taxonomyID); $metacontent=get_field('meta_content', 'product_cat_' . $taxonomyID);?> <?php if ($metacontent) { ?> <meta name="description" content="<?php echo $metacontent; ?>"/> <?php } else { ?> <?php woo_meta(); ?> <?php } ?>