Custom HTML doesn’t show when saved

  • Hi!
    I’m currently working on my academic website and would like to share a widget that I’ve coded in R. The widget is saved as HTML, and I’ve pasted the HTML-code into a ‘Remove Custom HTML”-block on WordPress. The widget shows perfectly when I preview the block. However, when I update the site and try to preview the full site, the content of the site doesn’t show anymore and the changes are lost.
    Do you know the reason for this and how I can solve it?
    I’m using a free domain, and I know that WordPress doesn’t allow all tags on all plans. My HTML-code includes the tag “link”, which I’m not sure I can get around.
    Could this be the explanation? If so, how likely is it that the widget can be saved and work if I’d upgrade my plan?

    I’m looking forward to all ideas and help!
    Luca

    WP.com: Yes
    Correct account: Yes

    The blog I need help with is: (visible only to logged in users)

  • Hi Luca,

    For security reasons, not all HTML tags are allowed in the Custom HTML block.
    List of supported HTML tags you may find here:
    https://wordpress.com/support/wordpress-editor/blocks/custom-html-block/#supported-html-tags

    Please note that the “link” tag, that you are using is not allowed on the free plan. However, can be used for plugin-enabled sites (paid version of WordPress Pro plan).

  • Hi there,

    My HTML-code includes the tag “link”, which I’m not sure I can get around.

    The <link> tag is used to denote the relationship between the current page and an external resource, and it’s not possible to import external resources into a WordPress.com post/page using a custom HTML block. We also don’t allow <iframe> or <script> tags:

    https://wordpress.com/en/support/code/

    Can you share the code you’re trying to use here for me, and explain what exactly it is you’re trying to do? Paste your code between backticks, else it will get stripped out here in the forums as well.

  • Thanks to both of you for your quick reply and thoughts! I upgraded my plan the Pro plan and used the WP Coder plugin, this made it work. So I assume it was indeed due to the <link> tag.

    Thanks for your support!

    Luca

  • The topic ‘Custom HTML doesn’t show when saved’ is closed to new replies.