Support » Plugin: WordPress Gallery Plugin - NextGEN Gallery » [Plugin: NextGEN Gallery] NGG and Featured Image issue

  • Andrea Sciamanna

    (@sciamannikoo)


    After fighting with the developer of Query Posts widget, that, via the Get The Image plugin, wasn’t showing featured images set using NGG, I’ve realized that the issue is in NGG.

    Quoting Justing (the developer of both widget and plugin):

    I just wanted to run a test with NGG since you mentioned it. I uploaded the plugin, created a gallery, and set the featured image from that gallery for the post. It didn’t work.

    This left me wondering why it wasn’t working. So, I went to my database to check the post meta for _thumbnail_id (this is how WP saves thumbnails). See, the thumbnail ID is supposed to be saved as an integer (e.g., 1, 2, 3, 4). However, NGG saved this as ngg-1. This is just bad practice altogether.

    So, when something like get_the_image() (or any plugin for that matter) asks for the thumbnail ID via the WordPress function get_post_thumbnail_id(), NGG borks the entire thing.

    He’s right indeed!

    Why NGG uses a string in a custom field that is supposed to contains an int?

    Ok, the_post_thumbnail() still get the right image, but probably this is because NGG is hooking or filtering this function: I’ve no clue actually.

    However, the way NGG works, is not good and need to be solved from my point of view.

    How?

Viewing 2 replies - 16 through 17 (of 17 total)
Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘[Plugin: NextGEN Gallery] NGG and Featured Image issue’ is closed to new replies.