=== Hoist Body Meta Tags Into Head ===
Contributors: seocontentmachine.com
Tags: meta, html, seo, head, body, dom, cleanup
Tested up to: 6.8
Stable tag: 1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Moves any <meta> tags that appear inside the <body> into the <head> automatically, ensuring valid HTML structure and improved SEO compatibility.

== Description ==

Some themes, plugins, or page builders incorrectly output `<meta>` tags inside the `<body>` of a page.  
This breaks HTML standards and can cause SEO, validation, and compatibility issues.

This plugin automatically detects any `<meta>` tags inside the `<body>`, removes them from the content, and moves them cleanly into the `<head>` section using a safe DOM parser.

**What it does:**

* Scans the final rendered HTML of each front-end page.
* Finds any `<meta>` tags inside the `<body>`.
* Moves them into the `<head>` automatically.
* Cleans up the body markup to avoid duplicates.
* Works with any theme or plugin, including page builders.
* No configuration required.

This is especially helpful if a plugin or template inserts SEO, Open Graph, or verification meta tags in the wrong place.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install via the WordPress plugin uploader.
2. Activate the plugin from the **Plugins** menu.
3. View your site’s source code — any `<meta>` tags previously in the `<body>` will now appear in the `<head>`.

No setup or configuration is needed.

== Frequently Asked Questions ==

= Why are meta tags appearing in the body? =

Some themes and plugins incorrectly echo `<meta>` tags during content rendering instead of using `wp_head`, which causes them to appear inside the `<body>`.

= Does this plugin modify the database? =

No. It only adjusts the final HTML sent to the browser.

= Will it work with page builders like Elementor, Divi, Bricks, etc.? =

Yes. The plugin runs on the final HTML output and works regardless of how the markup was generated.

= Does this affect admin pages or REST API? =

No. It runs only on front-end page loads.

== Screenshots ==

None

== Changelog ==

= 1.0 =
* Initial release (internal version).