Support » Plugins » RE: Enable plugin support in Custom Fields

  • Referencing:

    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:

    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,


  • The topic ‘RE: Enable plugin support in Custom Fields’ is closed to new replies.