Term Meta Oembed returns video link

Support MB Term Meta Term Meta Oembed returns video link

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4863
    sergeysemenovsergeysemenov
    Participant

    Hi.
    Term meta oembed field shows video preview in admin, but returns just link in frontend.
    My code <?php echo get_term_meta(get_queried_object()->term_id, 'rw_tax_video', true );?>

    #4864
    Anh TranAnh Tran
    Keymaster

    Hi Sergey,

    Yes, that's correct. The helper function returns only raw data of term meta value. It doesn’t return meaningful information for images, file, oembed. To make the oembed renders the video, please use this code:

    $meta = get_term_meta(get_queried_object()->term_id, 'rw_tax_video', true );
    $meta = RWMB_OEmbed_Field::get_embed( $meta );
    echo $meta;

    For more info, please read this documentation.

    #4865
    sergeysemenovsergeysemenov
    Participant

    Great! Works! Thank you!

    One more question on POST FIELD. I wrote this question to our previous discussion and didn't create additional topic.

    The aim is to make clonable dropdown select in my custom post template admin area to manually select ‘related’ custom posts and retrieve thumbnail and title of these posts in frontend. I managed to create such clonable dropdown field, so I can select my custom posts. But I can’t figure out how to display these selected posts thumbs and titles in frontend. Please help!

    #4867
    Anh TranAnh Tran
    Keymaster

    I've just replied you in that topic. Let's discuss there to keep focused 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Term Meta Oembed returns video link’ is closed to new replies.