• Resolved rogersundstrom

    (@rogersundstrom)


    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 to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support pdclark

    (@pdclark)

    You’re not running do_shortcode() or apply_shortcodes() on track_credit, therefore no shortcodes are parsed.

    Plugin Support pdclark

    (@pdclark)

    $diskografi_data = array(
        'tracknotes' => apply_shortcodes( $diskografinfo->field('track_credit') ),
    );

    …is what I’d expect.

    Thread Starter rogersundstrom

    (@rogersundstrom)

    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.