• Resolved astraobscura

    (@astraobscura)


    I am trying to configure the maintenance page to play a video as the background. I inserted the HTML:

    <video playsinline autoplay muted loop poster="noVideo.jpg" id="bgvid">
      <source src="video.mp4" type="video/webm">
      <source src="video.mp4" type="video/mp4">
    </video>

    as well as the CSS:

    
    video {
      object-fit: cover;
      width: 100vw;
      height: 100vh;
      position: fixed;
      top: 0;
      left: 0;
    }

    It removes the HTML for the video and won’t keep it there. It only leaves behind the HTML to show the image (for when the video doesn’t load or is still loading) How do I fix this??

    • This topic was modified 2 years, 10 months ago by astraobscura.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @astraobscura,

    The Text is sanitized (using the ‘wp_kses_post` built-in function), and it does not accept every HTML tag you introduce.

    Usually, I would recommend the [video] shortcode, but it doesn’t have options for all attributes you want (like muted or playsinline).

    Video Shortcode

    So, another idea would be to override the maintenance mode template and customize it however you need.

    https://github.com/andrianvaleanu/WP-Maintenance-Mode/blob/master/views/maintenance.php

    Also, there is a Custom CSS setting if you want to add custom CSS.


    George

    • This reply was modified 2 years, 10 months ago by George J.
    • This reply was modified 2 years, 10 months ago by George J.
    • This reply was modified 2 years, 10 months ago by George J. Reason: bad formatting
    • This reply was modified 2 years, 10 months ago by George J.
    • This reply was modified 2 years, 10 months ago by George J.
    • This reply was modified 2 years, 10 months ago by George J.
    • This reply was modified 2 years, 10 months ago by George J.
    • This reply was modified 2 years, 10 months ago by George J.
    • This reply was modified 2 years, 10 months ago by George J.
    • This reply was modified 2 years, 10 months ago by George J.
    Thread Starter astraobscura

    (@astraobscura)

    so maintenance.php is the file that displays when maintenance mode is active? I can just write my own custom PHP then that displays whatever. Now will that reset if I turn maint. mode off and back on in the future or will it store whatever I uploaded?

    Hello @astraobscura,

    so maintenance.php is the file that displays when maintenance mode is active?

    Yes.

    I can just write my own custom PHP then that displays whatever.

    Yes.

    Now will that reset if I turn maint. mode off and back on in the future or will it store whatever I uploaded?

    If you edit the template (maintenance.php) from the plugin directory, WordPress will overwrite it just on plugin update.

    If you override the template (the way described here), your custom template will remain the same no matter what. The plugin will always load it when you activate the maintenance mode.

    Hope this helps.


    George

    • This reply was modified 2 years, 10 months ago by George J.
    • This reply was modified 2 years, 10 months ago by George J.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Inserted HTML keeps getting removed!’ is closed to new replies.