Title: Pods Shortcode and data array
Last modified: November 24, 2022

---

# Pods Shortcode and data array

 *  Resolved [rogersundstrom](https://wordpress.org/support/users/rogersundstrom/)
 * (@rogersundstrom)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/pods-shortcode-and-data-array/)
 * I have problem to get items from shortcode in fields that came from a data array.
   
   I have no problem with Shortcode outside a data array.
 * Ex.
 *     ```
       while ($diskografinfo->fetch()) {
       $diskografibio = $diskografinfo->field('credit_1');
       $diskografibio = do_shortcode( wpautop( $diskografibio ) );
       $diskografi_data = array(
       'tracknotes' => $diskografinfo->field('track_credit'),
       );
       }
       ```
   
 * Pods Shortcode in field(‘credit_1’) shows data but Pods Shortcode in field(‘track_credit’)
   only shows _[pods name=”bandnamn” id=”7″]{@name}[/pods]_
 * What am I doing wrong here?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpods-shortcode-and-data-array%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/pods-shortcode-and-data-array/#post-16232311)
 * You’re not running do_shortcode() or apply_shortcodes() on track_credit, therefore
   no shortcodes are parsed.
 *  Plugin Support [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/pods-shortcode-and-data-array/#post-16232316)
 *     ```
       $diskografi_data = array(
           'tracknotes' => apply_shortcodes( $diskografinfo->field('track_credit') ),
       );
       ```
   
 * …is what I’d expect.
 *  Thread Starter [rogersundstrom](https://wordpress.org/support/users/rogersundstrom/)
 * (@rogersundstrom)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/pods-shortcode-and-data-array/#post-16232682)
 * Ahh, thanks Paul for the information!
 * I didn’t had the correct formatting for the shortcodes when I tested this within
   the data array. Many thanks for your exempel, it opened up my eyes 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Pods Shortcode and data array’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [rogersundstrom](https://wordpress.org/support/users/rogersundstrom/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/pods-shortcode-and-data-array/#post-16232682)
 * Status: resolved