Custom Fields
Re-Envisioned
Support MB Term Meta Term Meta Oembed returns video link

  • Creator
    Topic
  • #4863
    sergeysemenov
    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 );?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #4864
    Anh 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
    sergeysemenov
    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 Tran
    Keymaster

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

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

Newsletter

Subscribe to our newsletter to receive news and tutorials for Meta Box and WordPress.


grid gear info copy caret-up caret-down trash