How to Remove or Customize the H2 Wrapper Around Your Maintenance Mode Text
Content
Many users of the 'LightStart – Maintenance Mode, Coming Soon and Landing Page Builder' plugin have encountered a common issue: the main text content on their maintenance page is automatically wrapped in an <h2> HTML tag. This can cause problems for both design and website semantics, especially if you are adding complex HTML or multiple paragraphs within the text editor.
This design choice by the plugin's developers means that any content placed in the main text area is output within heading tags. While this might be suitable for a short, single-line heading, it is not ideal for longer, formatted text blocks and is considered invalid HTML if block-level elements like <div> or <p> are placed inside the <h2> tag.
Solution 1: Override the Template (Recommended for Advanced Users)
The most effective way to gain full control over the HTML structure is to create a custom template. This method allows you to remove the <h2> tags entirely or replace them with more appropriate HTML elements.
Here’s how to do it:
- Access your WordPress installation files via FTP or your hosting provider's file manager.
- Navigate to the plugin's folder:
/wp-content/plugins/wp-maintenance-mode/views/ - Locate the file
maintenance.phpand make a copy of it. - Place this copy into your active (child) theme's root directory.
- Rename the copied file to
wp-maintenance-mode.php. - Edit this new file. Look for the line of code that outputs the
$textvariable. It will likely look similar to this:<h2><?php echo $text; ?></h2> - You can now modify this line. To remove the heading tags completely, change it to:
<?php echo $text; ?>
Alternatively, you could wrap the content in a<div>with a custom class for styling:<div class="my-custom-text"><?php echo $text; ?></div>
By overriding the template, you can also exclude the plugin's default CSS and link your own custom stylesheet directly within the HTML for a fully personalized design.
Solution 2: Use Custom CSS for Visual Adjustments
If you prefer not to edit template files, you can use CSS to visually neutralize the effect of the <h2> tag. This doesn't change the underlying HTML but can make it look like a normal paragraph.
In the plugin's settings, navigate to the Design tab and find the Custom CSS box. Add the following CSS rule:
.wrap h2 {
font-size: 1em;
font-weight: normal;
display: block;
}This CSS will make the <h2> element inherit the standard text styling of the page, reducing its visual impact as a heading. However, please note that the <h2> tags will still be present in your page's code.
Conclusion
The automatic wrapping of text in an <h2> tag is a known characteristic of the 'LightStart – Maintenance Mode, Coming Soon and Landing Page Builder' plugin. For users who require valid HTML or specific design layouts, overriding the default template provides the most flexibility. For a quicker visual fix, custom CSS can be applied directly in the plugin's settings.
Related Support Threads Support
-
Exclude folders in child themehttps://wordpress.org/support/topic/exclude-folders-in-child-theme/
-
Center the Subscribe Texthttps://wordpress.org/support/topic/center-the-subscribe-text/
-
configuring Paint themehttps://wordpress.org/support/topic/configuring-paint-theme/
-
Change the words "Subscribe"https://wordpress.org/support/topic/change-the-words-subscribe/
-
Text box stripping HTML codehttps://wordpress.org/support/topic/text-box-stripping-html-code/
-
Unable to edit the text on WP Maintenance Modehttps://wordpress.org/support/topic/unable-to-edit-the-text-on-wp-maintenance-mode/
-
Fully customizable – not!https://wordpress.org/support/topic/fully-customizable-not/
-
Move everything uphttps://wordpress.org/support/topic/move-everything-up/
-
reducing the space between the blockshttps://wordpress.org/support/topic/reducing-the-space-between-the-blocks/
-
Removing span tag form plugin text editorhttps://wordpress.org/support/topic/removing-span-tag-form-plugin-text-editor/
-
Bigger Count down text and social links opening in a new windowhttps://wordpress.org/support/topic/bigger-count-down-text-and-social-links-opening-in-a-new-window/
-
Main text embraced with H2 taghttps://wordpress.org/support/topic/main-text-embraced-with-h2-tag/
-
[Plugin: WP Maintenance Mode] How to put text on separate lines?https://wordpress.org/support/topic/plugin-wp-maintenance-mode-how-to-put-text-on-separate-lines/
-
Fully Custom Template? Is Real?https://wordpress.org/support/topic/fully-custom-template-is-real/
-
Heading won't changehttps://wordpress.org/support/topic/heading-wont-change/
-
"Par Designmodo"https://wordpress.org/support/topic/par-designmodo/
-
HomePage too messy!https://wordpress.org/support/topic/homepage-too-messy/
-
h2 tag enclosing p tagshttps://wordpress.org/support/topic/h2-tag-enclosing-p-tags/
-
text fieldhttps://wordpress.org/support/topic/text-field-3/
-
width of wraphttps://wordpress.org/support/topic/width-of-wrap-2/
-
Crappy (invalid) HTML Markuphttps://wordpress.org/support/topic/crappy-invalid-html-markup/
-
Font Sizehttps://wordpress.org/support/topic/font-size-76/
-
Is the plugin responsive?https://wordpress.org/support/topic/is-the-plugin-responsive-2/
-
Wrap Box Opacityhttps://wordpress.org/support/topic/wrap-box-opacity/
-
Customize Texthttps://wordpress.org/support/topic/customize-text/
-
Change text position and sizehttps://wordpress.org/support/topic/change-text-position-and-size/
-
Can't get rid of the titlehttps://wordpress.org/support/topic/cant-get-rid-of-the-title/
-
WP maintenance mode optimized for mobile?https://wordpress.org/support/topic/wp-maintenance-mode-optimized-for-mobile/
-
ADDING CSShttps://wordpress.org/support/topic/adding-css-5/
-
Remove dashboard widgethttps://wordpress.org/support/topic/remove-dashboard-widget-3/
-
Fonthttps://wordpress.org/support/topic/font-42/
-
Remove dashboard widgethttps://wordpress.org/support/topic/remove-dashboard-widget-4/