Assistance Needed for Displaying Videos in Brizy Post Viewer
Dear Brizy Support Team,
Following up on the issue discussed in the forum thread here, we have successfully managed to display the video in the featured image area. However, we now need assistance with displaying it correctly in the Brizy post viewer.
Our goal is to have images displayed when a post features only an image and videos shown when a post includes a video, similar to the functionality shown in this example: Example.
Could you please guide us on how to achieve this within Brizy?
Thank you for your support.
Best regards,
-
Hi
If you want to display featured videos on the blog archive page, the solution I suggested earlier, which involves using ACF, may not work. You may need to use the Post Featured Video plugin for this task. If you find a Posts listing Gutenberg block that can display featured videos, kindly follow the procedure in the video at https://jmp.sh/JRbNZLX6 to create a Brizy page similar to https://www.academica.school/news/page/15/.
1 -
Hi George,
Thank you for your suggestion. We're trying to display the featured video in the "Post" archive provided by Brizy, but we're having trouble implementing it. Unfortunately, the method you're suggesting, with the Post Featured Video plugin, doesn't seem to work within Brizy's post archive setup.
Is there any workaround or specific integration method we could use to make this possible? We want to ensure the featured video appears directly in the post archive. Any advice or detailed steps would be greatly appreciated!
Best regards,
0 -
Unfortunately the Brizy Posts element does not support featured videos. Hence the suggestion to use a Gutenberg block to design the blog archive page.
0 -
Hi George,
Thank you for the update. We understand that the Brizy Posts element doesn’t currently support featured videos. However, we believe that adding this functionality would greatly enhance our site and significantly add value to Brizy.
Implementing this feature would help Brizy remain competitive with WPBakery, which already includes it. We would greatly appreciate your consideration in proposing its implementation, as it would be beneficial for many users looking for this capability.
Thank you for considering this!
Best regards,
0 -
Kindly add this as a suggestion at https://www.brizy.io/ideas-and-roadmap This allows other Brizy users to vote for it. Several ideas from the Ideas board gets into the development pipeline.
1 -
You can do this. I see that Video element has the link field slug type for dynamic loading.
I have done the same with attachment -> url using ACF and Code Snippets. When i hit Publish / Update the snippet automatically copies the uploaded attachment link into the hidden ACF url field, because i can't put attachments into the Posts element, so i put attachment's link into an icon's url to download it.
This because Brizy doesn't know (yet) to convert attachment's link uploaded in ACF form to dynamic content url.
1) Make a hidden ACF url field into the Form. Put some conditional logic for showing that never gets true, so the field is hidden all the time. In the example below the slug (in ACF is name) of the hidden field is: acf-video-url-hidden-field-slug.
2) Make a snippet in CodeSnippets that runs everywhere, because you will insert a filter for the new field to run when you hit Publish / Update.
algorithm:
- if hidden video url field is blank or is with the wrong/outdated link
- value of hidden video url field takes the value of the video's url
- returns the value into the hidden video url field
- add the filter to run on any Publish / Update only for the hidden field
function video_to_url( $value, $post_id, $field ){if( $value == '' || $value != wp_get_attachment_url(get_post_meta($post_id, 'acf-video-field-slug', true))){$value = wp_get_attachment_url(get_post_meta($post_id, 'acf-video-field-slug', true));}return $value;}add_filter('acf/load_value/name=acf-video-url-hidden-field-slug', 'video-to-url', 10, 3);You need to hit update for every post if you add the hidden field in ACF form, for it to update the hidden video link.To not break something in the production pages, make a test ACF form and fields and run on a new page. Just modify slugs in the snippet with the test ACF field slugs. Have fun!0 -
Thank you so much for the detailed explanation and guidance! 🙏 It really helps a lot.
I just wanted to clarify—are you referring to this plugin: Code Snippets? I want to make sure I'm using the right one for implementing your solution.
Thanks again!
0 -
Yes, with the free CodeSnippets plugin (php type snippet), that's what i use. And ACF also free version.
https://wordpress.org/plugins/code-snippets/
Don't forget to change the video element in Brizy to use Dynamic loading and point it to the hidden link field.
Cheers.
1
Please sign in to leave a comment.
Comments
8 comments