Support

Account

Home Forums Add-ons Gallery Field Galley displays 'Array, Array' instead of images

Solved

Galley displays 'Array, Array' instead of images

  • I’m attempting to display an image gallery in a custom post type with the Genesis framework.

    Following the gallery documentation here, I’ve added the following code to my single-pattern.php file.

    //* Display image gallery custom field
    add_action( 'genesis_before_entry_content', 'nsg_image_gallery' );
    function nsg_image_gallery () {
    	echo '<div class="acf-image-gallery">';
    	the_field('image_gallery');
    	echo '</div>';
    }

    Instead of the image gallery displaying on the front-end, the text “Array, Array, Array, Array” is displayed.

    I’m using the same code to display other custom fields with no problem. What am I missing here with the image gallery?

  • Hi @PixelFrau

    The gallery documentation does not say to use the_field. Please re-read the documentation to understand how you can loop over the gallery field data.

    Thanks
    E

  • I was able to figure it out, thanks. The response I received through your email support was much more helpful as it actually provided a link to the page and further instructions.

  • Hi @PixelFrau

    Thanks for reading the documentation.

    Cheers
    E

  • I had read the documentation. The problem is the necessary documentation is split up on a variety of pages, none of which link to each other. Thankfully the email support supplied links to all the pages needed which allowed me to modify the code to work with Genesis.

    Telling someone ‘re-read the documentation’ without telling them what documentation to read is kind of pointless. Great plugin, but the documentation could be better organised, especially for paying customers.

  • Hi @PixelFrau

    In your original comment, you directly referenced the gallery field documentation. This article shows 100% how to load a gallery field value and loop over the images.

    Your code however showed that you did not read this documentation and simply attempted to output the data like the_field('image_gallery');.

    Please feel free to point out where in the referenced documentation article it says to do this.

    Your attitude will not get you very far in the web. Please be patient and appreciative of FREE help. If someone asks you to ‘re-read’ something, it is because they realize you have missed something obvious, and they want you to learn with your own eyes instead of being spoon fed an answer.

    Thanks
    E

  • I greatly appreciate free help. However, I don’t appreciate snarky replies to a simple question about a PAID add on. And yes, I do indeed expect customer support for something I paid for.

    It wasn’t clear to me if I should be using code from http://www.advancedcustomfields.com/resources/getting-started/displaying-custom-field-values-in-your-theme/, http://www.advancedcustomfields.com/resources/getting-started/code-examples/ or http://www.advancedcustomfields.com/resources/field-types/gallery/, hence me asking what I was missing.

    To you, as the plugin developer, it is obvious. To plugin users, especially those new to the plugin, it is not always obvious. I wasn’t looking to be spoon fed an answer, otherwise I wouldn’t be modifying the code myself to work with the Genesis framework. I was simply asking for clarification about which code I should be using.

    It’s ironic that you mention patience and appreciation. Being patient with paying customers and appreciative that they’ve put some extra money in your pocket are the basics of good customer service.

    Ta, Elliot. Hope the plugin continues to go well for you.

  • Hi @PixelFrau

    All this over me asking you to re-read the documentation that you already referenced?

    Give me a break.

  • You do realize that you said in a previous comment:

    Following the gallery documentation here, I’ve added the following code to my single-pattern.php file.

    And you linked to the doc article: http://www.advancedcustomfields.com/resources/field-types/gallery/

    Maybe you pasted the wrong link, but to me, you had read the correct documentation but not used the correct code.

    I don’t like the way you have continually had a go at my replies. I am a web developer trying to help thousands of users and It’s not exactly fair when 1 user (yourself) starts saying things like:

    The response I received through your email support was much more helpful as it actually provided a link to the page and further instructions.

    You have only ever provoked this conversation. I do not like it. And I don’t understand what you stand to gain from it? Do you want me to become angry? Does that make you happy?

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Galley displays 'Array, Array' instead of images’ is closed to new replies.