RE: Enable plugin support in Custom Fields (1 post)

  1. aaroncross
    Posted 4 years ago #

    Referencing: http://wordpress.org/support/topic/enable-plugin-support-in-custom-fields

    the user s_ha_dum & minghags had a conversation about getting Pro Player to pass through a custom field..

    could we revisit this topic for my site?

    here's the php: http://pastebin.com/YkDMN9cc

    I understand that the solution was:

    Instead of this:

    echo get_post_meta($post->ID, $key, true);

    What I think you want is this:

    $fieldvalue = get_post_meta($post->ID, $key, true);
    echo $proPlayer->addPlayerCode($fieldvalue);

    You can often combine the two lines like so, if you want:

    echo $proPlayer->addPlayerCode(get_post_meta($post->ID, $key, true));

    To be safe you'd wrap the whole thing in an if/else like so:

    if ($proPlayer) {
    echo $proPlayer->addPlayerCode(get_post_meta($post->ID, $key, true));


    But my code doesn't exactly line up:

    $video1 = get_post_meta($post->ID, 'veevr', $single = true);

    i've tried adding the pro player code a couple ways but cant seem to figure it out..

    Any help would be greatly appreciated!

    Thanks for your time,


Topic Closed

This topic has been closed to new replies.

About this Topic