• Hi, hope this is in the right section.

    I’ve started using custom fields (www.kidcapricious.com). They’re being used as add-ons to posts to provide image/tweet/link etc of the day.

    I use the ‘audioplayer’ plugin to embed MP3’s sometimes, and some days I’d like to append a track to my post. However I’d like it to appear in a custom field.

    Usually, if [audio:xxx.mp3] is included in the main body content it gets processed and replaced with the audioplayer. This doesn’t happen within the custom field.

    Any idea how I can make this happen?

    Many thanks!

    C.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Could look at using something like this:

    <?php
    $custom_field_key='whatever your custom field key is';
    $myshortcode = get_post_meta($post->ID, $custom_field_key, true);
    do_shortcode($myshortcode);
    ?>
    Thread Starter userbraindamage

    (@userbraindamage)

    Thanks for the response Michael.

    If you don’t mind – I can’t get my head round the logic of that.
    Could you explain?

    Assuming we are talking about shortcodes that execute your player:

    assign your custom field key name (here you put your custom field key)

    get the custom field value for that key for that post

    execute the shortcode

    Thread Starter userbraindamage

    (@userbraindamage)

    Ok – I see. A bit slow today.

    Will give it a try, cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Fields – parsing audioplayer’ is closed to new replies.