Viewing 4 replies - 1 through 4 (of 4 total)
  • 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?

    Plugin Author RobertHarm

    (@harmr)

    solution depends on how you implemented your loops – try searching Google for “wordpress loop exclude category”
    best,
    Robert

    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. 🙂

    Plugin Author RobertHarm

    (@harmr)

    thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Embed into template’ is closed to new replies.