• Hey guys.
    I have a question regarding a meta-data box I’ve created. It’s positioned next to the post image and has some information (location etc) about each project my client makes a post about, that anyone writing a post can add in the bottom, in custom fields.

    However, I’m building a child theme from the theme Tetris from WPExplorer (https://www.wpexplorer.com/tetris-wordpress-theme/) and when I post a video post, there is a link to the video in my fancy meta-data box, like so:
    “wpex_post_video:
    https://vimeo.com/xxxxx”

    Also, when editing the post, you can see it as a custom field. Deleting the custom field simply deletes the whole video embed from the post. I would very much want to hide this info, and since there isn’t really any support given for this theme on WPExplorer I thought I’d give it a go here.

    I’m getting the meta info with “<?php the_meta(); ?>”.

    In single.php:

    // Video oEmbed
    if ( get_post_format() == 'video' ){
    	echo '<div id="post-video" class="fitvids">' . wp_oembed_get( get_post_meta( get_the_ID(), 'wpex_post_video', true ) ) . '</div>';
    }

    In content-video.php:

    // Show video based on meta option
    echo wp_oembed_get( get_post_meta( get_the_ID(), 'wpex_post_video', true ) );

    Any suggestions?
    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Have you contacted your theme’s vendors regarding this? We don’t support that theme.

    Thread Starter 666ogge666

    (@666ogge666)

    By the way, it has custom post types, the one mentioned being “video” (obviously) with a “Post Settings” field called “Video Format Embed”.

    I hope that’s enough info for now!

    Thread Starter 666ogge666

    (@666ogge666)

    Andrew Nevins:
    Thanks for the quick reply. I have tried but they have not responded. I see. Just thought I’d give it a go here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Video embed screwing up post meta’ is closed to new replies.