Site logo

[Support request] Trying to Add an HTML page into my WP website

Home Forums Support [Support request] Trying to Add an HTML page into my WP website

Home Forums Support Trying to Add an HTML page into my WP website

  • This topic has 3 replies, 2 voices, and was last updated 5 years ago by Elvin.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1761031
    Mary Pearson

    The page of concern is https://kimn.ca/marksold

    I am trying to add an HTML page. When we copy and paste the HTML code into the HTML tab of the page, the only thing that shows up is the header. We believe that the HTML is adding extra tags and removing others. Example – my son-in-law (who created the HTML page says):

    My code says:
    <p role=“alert” id=“errorMsg”></p>

    Your code says:

    <p role=“alert” id=“messageMsg”>

    So, it is missing the closing </p> tag.

    Then, just before the <script> tag, it has inserted a <p> tag….

    So, somehow you have to get WordPress to honour the text you are entering verbatim instead of trying to style it for you.

    Also, the <style</style> tags seem to be missing, so the page won’t look right either.

    So I thought the problem might be the TinyMCE plugin. I deactivated it but that didn’t change anything. So then I thought I could bypass the WP interference by adding the code directly into PHPMyAdmin, but again, nothing changed. The only thing we see is the header.

    Can you tell me please how to “get WordPress to honour the text you are entering verbatim instead of trying to style it for you.”

    Many thanks!

    #1761052
    Elvin
    Staff
    Customer Support

    Hi there,

    WordPress generally doesn’t do anything to added HTML elements. That change may be from a script.

    I’ve checked the page to confirm if it was change and as shown here – https://share.getcloudapp.com/Z4uo2vOg – I believe it kept the intended code which is <p role=“alert” id=“errorMsg”></p>.

    I’ve found the style tag as well. https://share.getcloudapp.com/nOuoJgqL

    Then, just before the <script> tag, it has inserted a <p> tag….

    Yeah that’s tinymce default.

    Try these suggestions:
    https://stackoverflow.com/questions/17376595/how-can-i-remove-p-tags-that-are-auto-added-within-tinymce
    https://stackoverflow.com/questions/52509650/how-to-remove-p-tag-in-tinymce/52511706
    https://wordpress.stackexchange.com/questions/191211/wordpress-tinymce-keep-wrapping-p-tags-to-html-codes-when-saving

    #1761057
    Mary Pearson

    Thank you Elvin. After looking at the links you suggest I am now more totally confused than ever. I will forward to my son-in-law and perhaps he will be able to make use of it.

    #1761059
    Elvin
    Staff
    Customer Support

    Thank you Elvin. After looking at the links you suggest I am now more totally confused than ever. I will forward to my son-in-law and perhaps he will be able to make use of it.

    If I may suggest:

    TinyMCE is pretty much outdated. Consider changing to Block Editor and use the HTML block.

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