• Resolved aloisglogar

    (@aloisglogar)


    Hi Anders:

    I have a problem on my website that I don’t know if it can be fixed with some code.

    This is when I try to embed a video on a page from “Vimeo”. I do it from the WordPress block editor “Gutemberg”. As I manage the rest of the elements on the pages and the entries.

    But unlike the other elements when I publish the result, this embedded video is not centered like the rest of the elements. Although this is indicated from the block editor.

    I am not sure that it can be fixed from the Theme. But I just can’t think of anything else.

    I leave you a couple of examples of how it looks.

    Is there a line of code that can solve this?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @aloisglogar,

    It looks like you’ve changed the width of the entry content section from 560 pixels to 750 pixels. The default width of embeds in the entry content is based on the global $content_width variable in the functions.php file of the theme, which is set to 560 pixels to match the default content width. You’ll have to change that value in a child theme to have the embeds default to your new content width.

    — Anders

    Thread Starter aloisglogar

    (@aloisglogar)

    Hi Anders:

    First of all thanks for taking the time to reply. It is a luxury and a luck that you are so aware of us.

    Although I did not remember having made any modifications to the theme (I do not have a child theme) I have looked at what you indicated in your answer. But I see that the value is still 560, just like you say. I am attaching a screenshot.

    So I still don’t know how to fix it. As I said before, I do not remember having made any modifications, beyond the column width of the text of the entries.

    I don’t know if it could be due to any plugin that is causing something like this. I do not know if as an orientation it may be worth to you that the signature in the photos that I put in the posts has also ceased to be centered and is justified on the left side.

    Thanks for everything.

    Thread Starter aloisglogar

    (@aloisglogar)

    Signature justified on the left side:

    https://aloisglogar.es/modelos-o-guapas/#.XwSThCgzbmE

    Thread Starter aloisglogar

    (@aloisglogar)

    Sorry but I don’t see how to attach a screenshot of the functions.php

    Theme Author Anders Norén

    (@anlino)

    Hi @aloisglogar,

    The “column width of the text of the entries” is the issue – the width of the columns has been changed, but the $content_width variable used to set the default width of embeds (among other things) is still the theme default, resulting in embeds being thinner than the custom column width of the text.

    You’ll have to create a child theme and set the $content_width variable in it to update the width of the embeds to match the modified width of the text column.

    — Anders

    Thread Starter aloisglogar

    (@aloisglogar)

    Thank you very much Anders:

    I already solved the problem following your instructions. Once again fantastic advice and fantastic attention.

    A big hug.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[NSFW] Problems with embedded videos from Vimeo’ is closed to new replies.