GD Post Badge: image doesn't works

This topic contains 9 replies, has 4 voices, and was last updated by  Naveen Giri 4 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #542309

    Brigitte
    Full Member
    Post count: 235

    Hi,

    Hello,

    The shortcode for default badges work well, but I want to use a custom image instead. Unfortunately, when I replace the default shortcode with the one, nothing appears.

    I see this custom shortcode here: https://wpgeodirectory.com/docs-v2/design/gd-badge/#image

    Obviously the url of the image is correct and I followed your advice using a simple quote for the parameters of the URL (in the shortcode)

    Here the used shortcode:

    [gd_post_badge key="claimed" condition="is_not_empty" badge="fiche certifiée"]

    Thanks for your help.

    #542318

    Kor
    Moderator
    Post count: 16516

    hi Brigitte,

    Thanks for your post. Your shortcode looks correct to me. Kindly share your Website Wp admin access here in private reply along with the URL of the page in question.

    #542357

    Brigitte
    Full Member
    Post count: 235
    This reply has been marked as private.
    #542404

    Alex Rollin
    Moderator
    Post count: 27815

    Try using an HTML block instead of a classic editor block.

    #542433

    Brigitte
    Full Member
    Post count: 235

    Alex you are right!!

    It’s very strange because the classic editor code modify the simple quote to double quote… I need absolutely works with Gutenberg but I don’t like it…

    Thank you very much.

    #542476

    Kor
    Moderator
    Post count: 16516
    This reply has been marked as private.
    #542644

    Brigitte
    Full Member
    Post count: 235

    Ok I understood, this is a bug:

    Example of the shortcode:

    [gd_post_badge key="claimed" condition="is_not_empty" alignment="left" badge="<img src='https://accentsduterroir.fr/medias/badges/mini/revendication.svg' />" bg_color="transparent" css_class="claim-badge"]

    With classic WP editor: when registering the shortcode above, AUTOMATICALLY WordPress replaces the single quote from the shortcode URL with a double quote and when registering the post, the badge does not appear.

    With Gutenberg WP editor (Custom HTML block): when saving the shortcode above, WordPress respects the simple quote of shortcode URL and saves the post well, and the badge appears. BUT if we re-edit the post, it once again replaces the double quote instead of the single quote. And so the badge no longer appears as soon as we save again the post.

    #542873

    Alex Rollin
    Moderator
    Post count: 27815

    The markup is correct. I have not seen this markup be sanitized in either classic (text) or in a Gutenberg HTML block. Are you using a builder or tinymce addon?

    #543087

    Brigitte
    Full Member
    Post count: 235

    Hello Alex, I tried to be as specific as possible… so no alternative editor, only the 2 WordPress editors (classic and Gutenberg HTML block).

    I just tried again the exact same problem as already mentioned here:

    With classic WP editor: when registering the shortcode above, AUTOMATICALLY WordPress replaces the single quote from the shortcode URL with a double quote and when registering the post, the badge does not appear.

    With Gutenberg WP editor (Custom HTML block): when saving the shortcode above, WordPress respects the simple quote of shortcode URL and saves the post well, and the badge appears. BUT if we re-edit the post, it once again replaces the double quote instead of the single quote. And so the badge no longer appears as soon as we save again the post.

    #543180

    Naveen Giri
    Moderator
    Post count: 1559
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 10 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket