• 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.php and 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?

    http://wordpress.org/plugins/nextgen-gallery/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @reypm = Please make use of your members area at http://nextgen-gallery.com/ to pose any questions or bring about any concerns for the NextGEN Pro plugin.

    Thanks!

    – Cais.

    Thread Starter reypm

    (@reypm)

    @photocrati, is that a NextGEN Pro feature? I’m working with basic version of plugin but I need to create this, for that I ask here

    Plugin Contributor photocrati

    (@photocrati)

    @reypm – The “Masonry” display is a NextGEN Pro feature

    – Cais

    Thread Starter reypm

    (@reypm)

    @photocrati I called masonry just because I want but this is not the version Pro, I’m trying to create my own template, less call it gallery-reypm.php just for avoid any miss understood, so based on this any advice what I’m doing wrong?

    Plugin Contributor photocrati

    (@photocrati)

    @reypm – Templates as you are tying to use them are part of the NextGEN Legacy shortcodes … this page should get you pointed in the right direction for how to construct a shortcode to use a template: http://www.nextgen-gallery.com/help/shortcodes/

    – Cais.

    Thread Starter reypm

    (@reypm)

    @photocrati, the problem here is the HTML markup that plugin templates generate since I need another markup, how I can create a new template for this purpose? If you notice my code I added UL and LI instead of common DIV’s, any help?

    Plugin Contributor photocrati

    (@photocrati)

    @reypm – We are actually considering deprecating (NextGEN Legacy) templates and as such we only offer suggestions to where you can get the information to build you own templates. As it is, you appear to be on the right track.

    You will just have to sort out the HTML and CSS according to what you are trying to accomplish with the template. Design aesthetics are not something we support with custom templates.

    – Cais.

    Thread Starter reypm

    (@reypm)

    @photocrati, nice I’m on track πŸ˜‰ I place the template in the legacy folder but how I can use from my shortcode? I get not images on gallery message if I try with -reypm as name I mean <?php echo do_shortcode('[ngg_images source="recent" display_type="photocrati-nextgen_reypm"]'); ?> this is my problem now, how I can fix that?

    Plugin Contributor photocrati

    (@photocrati)

    @reypn – The [ngg_images] is not the one you should be using … please go back and read the link I provided above. It provides the NextGEN Legacy shortcode configurations. Look specifically at those that use the template parameter and follow their lead.

    – Cais.

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.