Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Generateblocks Image Block

  • Hi,
    Have some questions about the GB Image block.

    My questions are:
    1. Why isn’t the caption when using an image allready in the media library not automatically added?
    2. If I add a caption via the CC button it doesn’t get the <figcaption> tag for use within the <figure> element? Any reason why not? I can add this by not using the CC button but by adding a Heading block underneath it and setting it io Advanced to figcaption but this seems more work and is also not really intuitive.

    I made a screencast video to clarify this: https://cloud.screenpresso.com/RtEKb/2024-05-08_09h44_18.mp4

  • Hi there,

    Why isn’t the caption when using an image allready in the media library not automatically added?

    You can fetch the caption that is being added in the media library by activating the Dynamic Data option.

    If I add a caption via the CC button it doesn’t get the <figcaption> tag for use within the <figure> element?

    The <figcaption> tag is added by default when you click the CC button to add the caption. You can see this in the HTML when you inspect the caption from the frontend.

  • Hi,
    When I try to add the caption via the cc button the tag isn’t added.

    Here is HTML is see for the caption:
    <p class=”gb-headline gb-headline-cb502323 gb-headline-text”>caption text</p>

    I’ll attach an url so you can check this.

  • Did you manully typed the caption text? If so, it’s just a paragphy, so it uses p tag.

    You can select the headline block and enable its dynamic data, and set the content source to caption, then the tag will change to figcaption

    Here’s an example:
    Backend: https://app.screencast.com/V3TZeEzmHfcll
    Frontend: https://app.screencast.com/TLTKSFwO1XM8U

  • Hi,
    Why is the manually option of typing the caption text a paragraph? What reasons are there for using a paragraph for a caption instead of a figcaption? I thought figcaption is prefered considering accessibility and semantics? Shouldn’t figcaption not be the default option and the paragraph tag the non default when using captions?

  • As the text is not from the caption field of the image, so it’s a paragraph.

    What’s wrong with adding your caption to the image and pull it dynamically?

    Let me know if you have difficulty doing that.

  • Not for me but for end users. If they write a post in the gutenberg editor the caption with CC button leads to a caption without the figcaption which is a bit confusing. To me it seems more consistent if the manual way also lead to the same result as with dynamic data. Just my opinion.

  • I can see the confusion 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.