Hello!
I have created 2 custom "embed media" fields. These fields are added to a custom post type. I am then pulling those fields into a content template. The videos display on the template page but when I save, they do not show in the browser. Please let me know if you need WP credentials to take a look.
Thank you so much!
Hello and thank you for contacting the Toolset support.
Yes, please, I'll need to take a closer look at your custom fields, the post, and the content template. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Please provide links for all these details:
- Custom fields.
- Content template.
- A post that you are testing.
On one hand, the content template is not assigned to any custom post type, but it is being used for the homepage. On the other hand, the content template's video blocks are not correctly configured. And I guess that the block editor has pulled the video just as an example.
This post you shared hidden link is a post from the "Content Update" custom post type. And it holds two custom fields for the videos. But the homepage does not have such fields, that's why the content template did not find any videos to show.
I would like to ask, where would you like to display these videos? In posts of the custom post type or on the homepage?
Then, where these videos should come from? A specific post? Or the post/page that is currently visited?
Thank you for the response.
I am attempting to get the fields that are on the home page content post to pull into the homepage content template. Then I would like to use this template on the homepage only.
I have attached a screenshot of how the videos are currently being pulled into the content template.
Thanks again!
Thank you for the details. I understand your use case better.
I tried on a clean install and I confirm that the "Youtube" Block is not rendering the video when pulled from a different post. But I was able to display the video with a "Single Field" block.
On your website, we can display the video by:
- Using the "Single Field" block instead of the "Youtube" block.
- Updating the video URL to include the protocol part "hidden link". Check this screenshot hidden link
I was able to display the first video on your website, check this screenshot hidden link
I did not remove the first "Youtube" block, so I'll let you remove that block and do the same for the second video.
I hope this is a viable solution for you. Otherwise, I can escalate the issue with the Youtube block to our 2nd Tier for further analysis. Let me know what you will prefer.
My issue is now resolved. Thank you so much!
This does work to display the video, however I loose the 16:9 aspect ratio. Is there a way to regain this? Thank you!
Currently, the field is an Embedded Media field, which means that the latest markup to generate on the frontend comes from the origin website, instead of the WordPress installation. Read more about the oEmbed protocol here https://wordpress.org/support/article/embeds/
The Toolset Youtube block allows you to choose the aspect ratio, but as we already experienced, it is not working well with the Embedded Media field. You may need to change the field type to a URL instead, and that will work smoothly without issues.
Check this test I run on a clean installation:
- Homepage: hidden link
- Backend: hidden link
The field is a URL field, check this screenshot hidden link
I wonder if it would be possible for you to change the field type to a URL? Let me know your feedback.
Hello! I changed the field to URL and the video no longer displayed. Are you suggesting another plugin I am using on the site is preventing the video from displaying correctly?
Thank you!
Maybe, that's true. I, personally, suspect that the server has some kind of caching, such as Varnish or Memcached, that is still holding a cache of the page or the content template.
I'll suggest:
- First, update Toolset Blocks to the latest release 1.3.1.
- Check with the hosting provider to purge any server-level caching if available.
- Perform a compatibility check, by switching to a default theme such as TwentyTwenty and deactivating all plugins except Toolset ones.
If this does not help, I'll need to take a copy of your website to check this locally, let me know if I can install the Duplicator plugin and take a copy.
I have removed all caching, deactivated all plugins except toolset, updated the toolset plugins, and switched themes with no success. You are free to install the duplicator plugin and take a copy.
Thank you!
Thank you! I took a copy and worked on it locally. Then I started again on a clean install and I was able to reproduce the issue. I am not sure what have I missed the first time when I tried on the test site. This time, the issue was reproduced for the Youtube block with an Embedded Media field and a URL field.
I am escalating this issue to our 2nd Tier for a second analysis, and I'll get back to you as soon as possible.
Our 2nd Tier has worked on the test site that I prepared and wonders why would you like to use a content template for the homepage when you can use the videos directly on the page, without using a content template?
I run a small test on this page hidden link and the Youtube block was pulling the videos successfully from an Embedded Media field and a URL field.
So, we wonder, would it be possible for you to build the homepage without using a content template?
Or do you need to use a content template? If yes, can you explain your use case?
To login to our test site use this URL hidden link
I will try to set up the blocks on the page directly and let you know if it works. Thank you!
Thank you for your feedback. I'll set this ticket as waiting for your reply, it should be kept open for 3 weeks, and you will receive email notifications before it is closed.