Please or Register to create posts and topics.

Embed Video Doesn't Show Up!

Hello, i connect my blog and forum to publish every post on a specific category. But it’s not display the embed video i have to add one more time manually and it’s suck. Can anyone fix this? Please?

How have you embedded the video? Did you just paste the link there or is it embedded via a shortcode?

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

It’s always like this in my posts;

<div class="single-embed-video">
https://www.youtube.com/somethingsomething
</div>

 

Have you activated the “Allow shortcodes in posts”-option in your forum-settings?

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Yes it’s checked from the begining..

Have you tried to embed the video without any shortcodes – just posting the URL to the video? It should work fine for YouTube videos.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

It worked thank you so much. I can use like that. One last question. As you can see i got a wrapper  to make video full width.

and i’m adding wrapper to all embed videos with this code;

function embed_wrapper($content) {
    // match any iframes
    $pattern = '~<iframe.*</iframe>|<embed.*</embed>~';
    preg_match_all($pattern, $content, $matches);

    foreach ($matches[0] as $match) {
        // wrap matched iframe with div
        $wrappedframe = '<div class="single-embed-video">' . $match . '</div>';

        //replace original iframe with new in content
        $content = str_replace($match, $wrappedframe, $content);
    }

    return $content;    
}
add_filter('the_content', 'embed_wrapper');

is there a way to use shortcodes in forum?

Using shortcodes in the forum should be no problem as long as the before mentioned option is activated. But I am not sure why your last example was not working. Maybe it is because of some configuration-issue with another plugin.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Thanks for your answer. As you can see on the attachment it’s checked. And also there is no plugin that effect to embed videos. I’ll try to uncheck and check again and save the settings maybe this is the problem. Great plugin by the way.

Uploaded files:
  • allowshortcodes.png