Why WordPress NextGEN Gallery or Album Pages May Return 404 Pages

March 25th, 2013 - Posted by Steve Marks to PHP, Web Development.

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.

Tags: ,
This entry was posted on Monday, March 25th, 2013 at 9:07 am by +Steve Marks and is filed under PHP, Web Development. You can follow any responses to this entry through the RSS 2.0 feed.

Fear not, we won't publish this

Comments (0)

No comments have been left yet. Be the first