I’ve used Custom Post Types for some time (back when NextGen was readable!), and have built two main forms.
The first is a portfolio slider, using Cycle2 (example : https://drewk.photo/showcase/main-portfolio/). I took an old plugin by JJ Coder and remodelled it. I like this because it lets me keep the thumbs and main image is step.
The second is a lightbox structure, using Lightbox Plus Colorbox (non-mobile) and “Photoswipe for NextGen Gallery” (mobile). This post type has a number of template variants, including albums with a separate page (and thumbnail) for each gallery (example : https://drewk.photo/events/london-fashion-weekend-aw-2014/#lfwe-julien-macdonald). Sadly the LB+CB no longer appears in the plugin repository.
There’s quite a bit of coding in the background, of course, but the next effect is I just need to put the gallery / album in as a parameter. I hadn’t figured out shortcodes when I developed this, but the layouts are very different.
I have written a shortcode to create thumbnails based on an image tag, which can be included in a standard post.
And I’ve also reworked Shaun Alberts’ ‘nextgen-custom-fields‘ plugin to object-oriented, which is really useful. For those not familiar with it, this creates three additional tables allowing fields to be added in at gallery or image level, which can do some really interesting things in terms of control breaks and pagination. Example : https://drewk.photo/events/moseley-folk-festival-2014/.
Ideally, I think this could work in native WP taxonomies now, but that’s a whole lot more work.
I’ve also dabbled with some interesting AJAX stuff (for client proofing), which has a lot of potential.
I’m happy to release the code for this, if someone wants to take it on – I haven’t had time to get it in line with WP plugin standards (it would be a first for me). It does seem to work since NextCellent 1.19.35, but I’ve not destruction tested it. I don’t have time for a lot of support, I’m afraid.
Sorry if I’ve wittered on a bit, or gone off-topic.
But, to summarise :
I use Custom Post Types for presentation logic, with ‘NextGen Custom Fields’ for additional logic control.
I can present a gallery in different ways (slideshow or lightbox), by assigning a different post type.
If I’m only using a few images in a post, I’ll put those in a catch-all gallery, and select using image tags.
-
This reply was modified 6 years, 11 months ago by muttznutz.