• Resolved dejernet

    (@dejernet)


    First, thank you for the simple and elegant plugin for NGG.

    I wanted to point out a small issue that might be caused by WPMU (Multisite mode) being turned on.

    Simply put, the newer way of pulling image custom fields <?php echo $image->ngg_custom_fields[“Your Field Name Here”]; ?> does not seem to work. I was able to pull the information using the older <?php echo nggcf_get_field($image->pid, ‘Awesome field’); ?>. So it works, but you might want to make note of this small issue.

    There is also the possibility that this isn’t a multisite problem, as the page my code is on pulls the gallery with

    $imagegallery = new nggdb();
    $images = $imagegallery->get_gallery(‘my-gallery’);
    foreach ($images as $image) {

    echo $image->ngg_custom_fields[“Hero Link”];

    }

    http://ww.wp.xz.cn/extend/plugins/nextgen-gallery-custom-fields/

Viewing 1 replies (of 1 total)
  • Plugin Author shauno

    (@shauno)

    Hi dejernet

    The ‘new’ way of getting the custom fields will only work when looping through the images passed directly from NGG. That is because NGG CF hooks into array of images before they are passed to the template, and appends the CF info.
    If you are getting the images in a custom way, like you, the CF plugin never had a chance to hook into that process and append the CF data.

    But as you found out, the API will always be able to get the CF data for an image with a simple call 🙂

    I’m glad the plugin is working on multisite, as to be honest, I never really tested it there much.

    Thank you for the feedback, I hope the plugin is useful for you.

Viewing 1 replies (of 1 total)

The topic ‘Multisite Support’ is closed to new replies.