WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Custom Fields
NextGen Galleryview and Custom Fields (3 posts)

  1. fwunder
    Member
    Posted 2 years ago #

    I'm sure I'm missing something simple with picture ID (pid), but I simply cannot get my custom fields to work with GalleryView. The relevant GalleryView code:

    $final = array();
        foreach($pictures as $picture) {
          $aux = array();
          $aux["price"] = $image->ngg_custom_fields["Price:"]; //custom field
          $aux["title"] = $picture->alttext; // $picture->alttext;
          $aux["desc"]  = $picture->description;
    (etc.)

    And

    $out .= "  <span class=\"price-overlay\"> " . "<h2>" . $picture["price"]  . "</h2>"
    (etc.)

    Thanks!!

    http://wordpress.org/extend/plugins/nextgen-gallery-custom-fields/

  2. fwunder
    Member
    Posted 2 years ago #

    I think I sorted it out. This seems to work fine:

    $final = array();
        foreach($pictures as $picture) {
          $aux = array();
          $aux["price"] = nggcf_get_field($picture->pid, 'Price:');
    (etc.)

    And

    $out .= "  <span class=\"price-overlay\"> " . "<h2>" . $picture["price"]  . "</h2>"
    (etc.)
  3. shauno
    Member
    Plugin Author

    Posted 2 years ago #

    Yip, as you found out, not all the 'templates' are actually in the /view/ directoy. I think it's a legacy thing with NGG, as the early versions had no front end templates from what I remember.

    I'm glad you figured the solution out and got it working for you!

    [ Signature moderated. ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic