If your theme support this shortcode on posts and pages we can assume your shortcode is working fine, but bbPress is for security reasons blocking.
Place this code into functions.php
function jm_bbp_shortcodes( $content, $reply_id ) {
return video( $content );
}
add_filter('bbp_get_reply_content', 'jm_bbp_shortcodes', 10, 2);
add_filter('bbp_get_topic_content', 'jm_bbp_shortcodes', 10, 2);
Let me know if you need help.
Thank you.
The theme supports videos, i.e. no issues to add them to regular blog posts.
Added the code, this results in Fatal error: Call to undefined function video()
.
btw: embedding youtube videos doesn’t work either
Install plugin bbPress2 shortcode whitelist
And to settings write video
Awesome!
Video is now embedded. However, if a bbpress post contains text followed by the video, the text is not displyed, only the video. In pure text posts, nothing is displayed at all…
Any other ideas?
– MannMitHund
Install plugin bbPress2 shortcode whitelist.
just write string: video into that small text area
Now we are talking!
Thank you very much for the support.
You have to paste content – text and below video, above the video.
Do you really need this shortcode? I am sorry about this, but for many reasons it is enough to use just video from youtube, because, if you will use the video than you will need CDN also. And this shortcode in my opition do not have nice css stylesheet.
iframe tag is styled nicely, works for text content below and up.
All good for me. Thanks again!
Hi, May I know where can I get Function.php file? I couldn’t find it. And is it necessary to paste the code below into the file?
function jm_bbp_shortcodes( $content, $reply_id ) {
return video( $content );
}
add_filter(‘bbp_get_reply_content’, ‘jm_bbp_shortcodes’, 10, 2);
add_filter(‘bbp_get_topic_content’, ‘jm_bbp_shortcodes’, 10, 2);
This post happened 2 years ago. Is there anything new that I need to do?
Hello,
Any reply? Have you seen this post?
Hi @fabianno0572,
The best way to put extra functions is in a functions.php in a child theme.
Some is explained here: https://codex.bbpress.org/functions-files-and-child-themes-explained/
Hi, I put all my functions into snippet, and the snippet works fine for me.
However, in order to solve the video problem, which shows only code in the front page, (yet, it shows at the backend without problem), I tried to put the above code into the snippet, the result is that all contents in the bbpress forum went disappeared.
Could anyone advise what to do next?
The video code is like below.
[video width="640" height="640" mp4="URL../wp-content/uploads/2017/10/video.mp4"][/video]
Shoutout for plugin bbPress2 shortcode whitelist.