• Resolved robgillth

    (@robgillth)


    hello,
    I am having trouble with the sizing for Bandcamp shortcode embeds. The player takes on the full page body size. I have tried changing this using inline CSS in the customizer with no luck. I have also tried the html iframe version and it works (sort of – still some minor sizing problems) but I really insist on using the shortcode version. I have tried plug-in troubleshooting by disabling them etc.. with no luck. This is for a www.ads-software.com site with the 2020 theme. JetPack -> Settings -> Writing ‘Compose using shortcodes to embed media from popular sites’ is enabled. WordPress, plugins, and browsers (Firefox and Chrome) are all current versions. I am having the same issue no matter what desktop browser I use. It looks okay on cellphone, but the embeds are definitely full width. So there seems to be a ‘full width’ issue here that I cannot resolve. I am on the steep end of the learning curve when it comes to web development.
    Here are a couple of .jpgs demonstrating what it looks like in my browser:

    View post on imgur.com

    View post on imgur.com

    (needed two screenshots to capture entire embed due to large size)

    and here is what the embed should look like:

    View post on imgur.com

    This last image is from a WordPress.com site that I recently migrated from.

    thank you if anybody can help me with this,
    Rob

    • This topic was modified 3 years, 2 months ago by robgillth.
    • This topic was modified 3 years, 2 months ago by robgillth.
    • This topic was modified 3 years, 2 months ago by robgillth.
    • This topic was modified 3 years, 2 months ago by robgillth.
    • This topic was modified 3 years, 2 months ago by robgillth.
    • This topic was modified 3 years, 2 months ago by robgillth.
    • This topic was modified 3 years, 2 months ago by robgillth.
    • This topic was modified 3 years, 2 months ago by robgillth.
    • This topic was modified 3 years, 2 months ago by robgillth.

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

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Contributor Dan (a11n)

    (@drawmyface)

    Hi there

    I haven’t been able to reproduce this on a test site using the 2020 theme. Can you share the exact shortcode that you used? Did you add it using a shortcode block?

    Thread Starter robgillth

    (@robgillth)

    Yes – I used a shortcode block:

    ‘[bandcamp width=350 height=470 album=152909386 size=large bgcol=ffffff linkcol=0687f5 tracklist=false]’

    I switched to the 2021 theme and it works as expected there.
    I am using the ‘Options for Twentytwenty’ plug in (in the 2020 theme) to adjust the width of the content area from the default 58rem(580px) to 100rem(1000px) and that is what makes the player expand to that width. I tried doing the same with the 2021 theme (using the ‘Options for twentytwentyone’ plug-in) and it does not make the player change size. I don’t know how to get around this as I need the content to be wider than 580px and would prefer to use the 2020 theme. Also, even though I used the shortcode, the theme has somehow converted the player to the html iframe version (as if I did not choose the ‘wordpress.com’ option in the Bandcamp code embed popup). At this point, I am thinking this may be a theme issue but I just don’t know.

    thank you for looking into this,

    Thread Starter robgillth

    (@robgillth)

    Yes – I used a shortcode block:

    ‘[bandcamp width=350 height=470 album=152909386 size=large bgcol=ffffff linkcol=0687f5 tracklist=false]’

    I switched to the 2021 theme and it works as expected there.
    I am using the ‘Options for Twentytwenty’ plug-in (in the 2020 theme) to adjust the width of the content area from the default 58rem(580px) to 100rem(1000px) and the player expands to the same width (1000px). I tried doing the same with the 2021 theme (using the ‘Options for twentytwentyone’ plug-in) and it does not make the player change size. I don’t know how to get around this as I need the content to be wider than 580px and would prefer to use the 2020 theme. Also, even though I used the shortcode, the theme has somehow converted the player to the html iframe version (as if I did not choose the ‘wordpress.com’ option in the Bandcamp code embed popup). At this point, I am thinking this may be a theme issue but I just don’t know.

    thank you for looking into this,

    Plugin Contributor Dan (a11n)

    (@drawmyface)

    Hi again

    This CSS worked for me in testing:

    iframe {width: auto !important;}

    Can you try adding that via the Customizer and see if it helps?

    Thread Starter robgillth

    (@robgillth)

    I tried it out and it succeeded in reducing the size of the Bandcamp embed but it also made all of the Vimeo embeds on the same page very tiny (most are 16:9 aspect ratio).

    Anonymous User 18700194

    (@anonymized-18700194)

    Sorry about that. You are correct, the code provided above will change all embeds.

    To restrict the code to that specific page you will need to add this instead:

    .page-id-3197 iframe { width: auto !important; }

    Thread Starter robgillth

    (@robgillth)

    Those Vimeo embeds are on the same page so the above code has the same effect.

    Anonymous User 18700194

    (@anonymized-18700194)

    I based my answer on the page that was provided when the thread was originally opened (the albums page). That page only had Bandcamp embeds.

    When you wrote that both Vimeo and Bandcamp embeds were affected, I thought that you wanted the code only to apply to the original page.

    Can you provide us with the specific URL where you experiencing this issue?

    It’s possible that this level of customization is outside of what we can support, but we can say for sure once we have the URL that you are looking at.

    Thread Starter robgillth

    (@robgillth)

    Yes, you’re right, my mistake. Here’s the page I am working on currently: https://robgillthings.net/agp/

    thank you for your attention to this!

    Anonymous User 18700194

    (@anonymized-18700194)

    Thanks for providing the URL.

    Unfortunately, the way that page is set up, we can’t make an adjustment to the Bandcamp embed without it also affecting the Vimeo embed as both are embedded as an iframe.

    The code that we provided is scoped to the Albums page and will work there. The variation in the Vimeo video size on /agp/ is coming from Vimeo directly and isn’t being caused by the code provided earlier.

    Thread Starter robgillth

    (@robgillth)

    Anonymous User 18700194

    (@anonymized-18700194)

    The code you are implementing in your screenshot is:

    iframe {width: auto !important;}

    You will need to remove that and replace it with:

    .page-id-3197 iframe { width: auto !important; }

    This will limit the change to only the /albums/ page. The .page-id-3197 must be included exactly as provided above.

    Thread Starter robgillth

    (@robgillth)

    I am addressing this remark:

    “The variation in the Vimeo video size on /agp/ is coming from Vimeo directly and isn’t being caused by the code provided earlier. ”

    Thread Starter robgillth

    (@robgillth)

    Ultimately I need this to work on pages where there are embeds from other sources.

    Anonymous User 18700194

    (@anonymized-18700194)

    You will need to remove this code entirely from your site:

    iframe {width: auto !important;}

    It is changing the sizing of all embeds on your site.

    My apologizes if my previous comment:

    The variation in the Vimeo video size on /agp/ is coming from Vimeo directly and isn’t being caused by the code provided earlier.

    wasn’t clear. I was referring to the fact that some of the Vimeo embeds are wider than others as shown in this screenshot:

    https://d.pr/i/WLzjzV

    There unfortunately isn’t a way to fix the Bandcamp embeds on pages with other embeds. To do so would require a level of custom coding that is outside of what we can support.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘embed (Bandcamp) sizing issue’ is closed to new replies.