I am trying to: Embed video (working on localhost).
Link to a page where the issue can be seen:
I expected to see: Small embedded video
Instead, I got: full screen embedded video
Dear Felix,
I assume we area talking about the custom "Embedded media" field created with Types plugin, please check our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media
You can specific the width and height attibutes within shortcode [types], for example:
[types field="my-embedded-media-field" width="450" height="320"][/types]
width:
image width (e.g. 300)
Image will be resized before being sent to the client. width and height will be ignored if size is set. For Embedded media the width and height are maximum values and may be ignored if $content_width is set for the theme.
I have no problem setting image heights, my problem is with embedded youtube video media.
Since I reported this problem to you, I was able to get it to work with 3 columns in a row (specified in the loop).
When I increase the number of columns to 4, I get the same problem I had before, the videos take the full screen and appear vertically in one column. Setting the width and height do nothing to change the size of the video preview.
An interesting thing happens when I set the columns back to 3, I have to save my content template and view again to get the site to show 3 columns. I attached a picture of the screen.
I would like this to work with 4 columns.
I am using the Divi them and the $content_width is set in the functions.php file for the Theme. Is there any way I can get this to work with Divi or any theme?
I assume we are talking about this case:
1) There is $content_width settings in your theme file functions.php
2) You are going to setup small width than the $content_width settings
As the document mentioned:
https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media
For Embedded media the width and height are maximum values and may be ignored if $content_width is set for the theme.
So if you have setup the value of $content_width, then the width setting maybe ignored, if you agree, we can take it as a feature request, our developers will evaluate it.
Ok, take it as a feature request, but that doesn't solve my problem.
So you are saying that I cannot used the Divi Theme because it sets the $content_width variable and there is no way around that. Is that correct.
I was able to get 3 columns by using custom CSS (without specifying the width of the video preview).
I do not believe I closed this case. Can you please answer my most recent reply? Thanks
No, what I mean is there isn't such a built-in feature within Types plugin, see our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#embedded-media
If you need to use the $content_width settings and a small video width, it needs custom CSS codes, if you need assistance for it, please provide a live page URL with same problem, I can try setup a CSS codes for you, thanks