• Resolved Wendy T

    (@blackrocknetworks)


    I had searched through the forums for this topic but many were for the older version or unresolved. I did however come across an answer on a website so I thought I would post it.

    https://snippets.webaware.com.au/howto/creating-a-custom-gallery-template-for-nextgen-gallery/

    I posted Ross’s answer below.

    Folder for Templates: nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view/

    Customizing for a theme

    If you want to customize one of the standard templates for your theme, or create a whole new template, just copy a gallery template from NextGEN’s “view” folder into a folder called “nggallery” in your theme. If you want it to be a new template and not override a standard template, give it a new name starting with “gallery-“.

    For example, let’s say we want to create a new gallery template called “awesomeness”. Because it’s going to be just full of it. So here is an outline of the process:

    • create the folder “nggallery” inside the theme folder
      copy the file “gallery.php” from NextGEN’s “view” folder to the new “nggallery” folder
    • rename the new file to “gallery-awesomeness.php”
    • edit “gallery-awesomeness.php” to customize it full of awesome
    • use the new template, e.g. with a shortcode: [[nggallery id=”1″ template=”awesomeness”]] OR using the UI when you are editing or creating a gallery under customize the display settings > templates > childtheme gallery-awesomeness.php.

    Note: the template filename must start with “gallery-” but you leave that bit out when referencing it in shortcodes!

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

Viewing 1 replies (of 1 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @blackrocknetworks – Thanks for sharing!

    Please keep in mind, due to the standard WordPress update process you should also keep a backup of these templates as it could get removed from your theme’s folder with every theme update!

    – Cais.

Viewing 1 replies (of 1 total)
  • The topic ‘Creating a custom gallery template for NextGEN Gallery’ is closed to new replies.