Why WordPress NextGEN Gallery or Album Pages May Return 404 Pages
Whilst recently implementing a NextGEN photo gallery plugin into a WordPress site, I came across a problem whereby pages that should have been displaying galleries or albums, were instead showing a 404 page.
I was stuck on this problem for literally 2 hours and, after searching on forum after forum, could not find a viable solution anywhere.
What was the cause? Well, to be fair it wasn’t the fault of the NextGEN Gallery. It was indeed my coding that had broken the photo gallery. I had setup a custom post type called ‘gallery’ that was conflicting with the plugin. Turns out that the plugin uses the same post type name, and therefore was causing it to fail.
After changing my custom post type name in my themes functions.php file, the photo gallery began to work as expected. It would be great if the plugin detected a conflicting custom post type and warned developers about this. I’ll put it to the plugin authors and hopefully it will get added as a feature soon.
No comments have been left yet. Be the first