Thread Starter
ufopsi
(@ufopsi)
I know this code works:
<?php echo do_shortcode('[mapsmarker layer="1"]'); ?>
I just need to tell WP if the category ID is not 2, do not execute do_shortcode. Any ideas?
solution depends on how you implemented your loops – try searching Google for “wordpress loop exclude category”
best,
Robert
Thread Starter
ufopsi
(@ufopsi)
Hi, thanks for the tip. This works in archives.php:
<!-- Google Maps for SPASS -->
<?php if (in_category('Pratiche SPASS'))
echo do_shortcode('[mapsmarker layer="1"]'); ?>
<!-- End Google Maps -->
Feel free to add this to the documentation. 🙂