WordPress.org

Ready to get started?Download WordPress

Forums

Pods - Custom Content Types and Fields
[resolved] Display gallery from pod item WYSIWYG field in wp template (4 posts)

  1. Olly - OWMC
    Member
    Posted 1 year ago #

    I have an ACT pod item with a WYSIWYG field so that the admin can insert a gallery of images.

    I use the code at MondayByNoon to call the pod item onto my WP page template. Everthing loads fine except the image gallery from the WYSIWYG field which renders on the front end as the wordpress short code: [gallery ids="12"]

    I tried using a data cleanup like you would for displaying a single photo but got a php error "Cannot use string offset as an array in... [line number of data clean up]'

    // data cleanup
        	      $services_photo     = $services_photo[0]['guid'];

    http://wordpress.org/extend/plugins/pods/

  2. Olly - OWMC
    Member
    Posted 1 year ago #

    page i'm working on: http://dev.omuk.com/studios/

  3. Olly - OWMC
    Member
    Posted 1 year ago #

    I figured it out!

    So all I needed to do to the MondayByNoon script was replace this:

    <?php echo $studio_gallery; ?>

    with this:

    <?php echo do_shortcode( $studio_gallery ); ?>

    Huzzah!

  4. Scott Kingsley Clark
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for posting the fix, glad you've got it working :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic