Create and register new template and use from do_shortcode function
-
Hi, I’ve create this template based on defaults:
<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?> <?php if (!empty($gallery)) { ?> <ul class="grid effect-8" id="grid"> <?php foreach ($images as $image) : ?> <li> <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> class="img-responsive" /> <div class="post-icon"> <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" rel="prettyPhoto2"><span class="icon-zoom-in"></span></a> </div> </li> <?php if ($image->hidden) continue; ?> <?php endforeach; ?> </ul> <?php } ?>and I called the file
gallery-masonry.phpand save the file in/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view/. After that in my template I’m using shortcode as follow:<?php echo do_shortcode('[ngg_images source="recent" display_type="photocrati-nextgen_basic_masonry"]'); ?>
but doesn’t work, why I’m doing wrong?
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
The topic ‘Create and register new template and use from do_shortcode function’ is closed to new replies.