Title: Latest version breaking tags
Last modified: April 29, 2026

---

# Latest version breaking tags

 *  Resolved [sevenstarsystems](https://wordpress.org/support/users/sevenstarsystems/)
 * (@sevenstarsystems)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/latest-version-breaking-tags/)
 * Hey guys,
 * Troubleshooting an issue for a client, and noticed that UAE was breaking the 
   site’s <title> tag.
 * We had to patch it with the following fix, but would appreciate you looking into
   this on your end.
 * Thanks!
 *     ```wp-block-code
       add_action('template_redirect', function() {    ob_start(function($html) {        if (is_admin()) return $html;        if (strpos($html, '<title>') !== false) return $html;        $post = get_post();        if (!$post) return $html;        $title = '';        // RankMath        if (defined('RANK_MATH_VERSION')) {            $title = get_post_meta($post->ID, 'rank_math_title', true);        }        // Yoast SEO        if (empty($title) && defined('WPSEO_VERSION')) {            $title = get_post_meta($post->ID, '_yoast_wpseo_title', true);        }        // AIOSEO        if (empty($title) && defined('AIOSEO_VERSION')) {            $title = get_post_meta($post->ID, '_aioseo_title', true);        }        // Universal fallback — works regardless of SEO plugin        if (empty($title)) {            $title = get_the_title($post->ID) . ' - ' . get_bloginfo('name');        }        $title_tag = '<title>' . esc_html($title) . '</title>';        $html = str_replace('<head>', '<head>' . "\n" . $title_tag, $html);        return $html;    });}, 0);
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Jan Gerald Starosa](https://wordpress.org/support/users/jangsr/)
 * (@jangsr)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/latest-version-breaking-tags/#post-18894865)
 * Hi [@sevenstarsystems](https://wordpress.org/support/users/sevenstarsystems/),
   
   thanks for reporting this!We looked into the code and couldn’t reproduce a case
   where UAE/HFE removesthe tag, hfe-header.php calls wp_head() before we clear 
   its hooks, so the title should always be rendered. That said, we’d like to dig
   deeper to confirm whether something specific to your setup is triggering this.
   Before applying the workaround, we’d caution against it, it reads raw post meta
   from SEO plugins, which store title templates (e.g. %%title%% %%sep%% %%sitename%%
   in Yoast, %title% %sep() %sitename% in Rank Math), not the final rendered strings.
   The fix would inject those unprocessed variables directly into <title>, which
   would likely hurt SEO more than a missing tag would.Could you share a few details
   so we can investigate properly?
    - Which theme you are using?
    - Which SEO plugin (Yoast, Rank Math, AIOSEO, or none)?
    - In the HFE settings, which compatibility mode is selected – Default or Option
      2?
    - Is this happening on all pages or specific ones?
    - Can you share a URL where we can inspect the rendered HTML?
 * We want to make sure we fix the root cause rather than patch over it. 
   Thanks!
 *  Thread Starter [sevenstarsystems](https://wordpress.org/support/users/sevenstarsystems/)
 * (@sevenstarsystems)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/latest-version-breaking-tags/#post-18895657)
 * Yep, I’m aware of the limitations of the workaround, but thank you… It currently
   works in our RankMath setup, as the meta fields are being stamped with the actual,
   rendered titles, but thanks for the heads up on that.
    1. It’s a custom theme (we inherited this site).
    2. SEO is RankMath.
    3. Option 1 (Option 2 doesn’t work at all, it seems… still shows other headers)
    4. All of them. I made a test page, and the issue didn’t present when the page 
       was blank or just had a shortcode, but as soon as I put an Elementor text element
       in there, the problem appeared. Very strange.
    5. I’m hesitant to take down the workaround for inspection, but I can tell you 
       that the <title> tag was completely absent from the <head> tag.
 * Very weird situation that I haven’t encountered before. When UAE is disabled,
   the title comes back, but then obviously so do the non-UAE headers.
 * Thanks!
 *  Plugin Support [Dhruv](https://wordpress.org/support/users/dpandya/)
 * (@dpandya)
 * [1 month ago](https://wordpress.org/support/topic/latest-version-breaking-tags/#post-18899619)
 * Hi [@sevenstarsystems](https://wordpress.org/support/users/sevenstarsystems/),
 * Thanks for the detailed follow-up. Based on your description, this looks like
   it may be related to how our default compatibility mode (Option 1) handles the
   original theme’s `header.php`, and we’d like to verify that against your specific
   setup.
 * To investigate without disrupting your live site, could you share:
    1. **The site URL.** Even with your workaround active, we can still inspect the
       rendered HTML, the theme structure, and how Elementor outputs onto the page-
       that gives us most of what we need.
    2. **Two snippets from the custom theme** (you can paste them here, no need to 
       share files):
    3.  - The `<head>` section of the theme’s `header.php` — specifically how the `
          <title>` tag is rendered (printed directly, or left to `wp_head()`?).
        - Any `add_theme_support( 'title-tag' )` declaration in the theme’s `functions.
          php`.
    4. **An optional isolated test, if convenient.** Create a single test page, temporarily
       bypass your workaround for just that one URL, and confirm whether `<title>` 
       is missing there. This lets us see the unpatched output on a controlled URL 
       without touching the rest of the site.
 * In parallel, we’re reviewing the relevant code path in our default compatibility
   mode (specifically how the theme’s `header.php` is buffered when HFE replaces
   it) to see whether the title can be preserved in cases where the theme prints
   it directly rather than via `wp_head`.
 * On Option 2, that sounds like a separate theme compatibility issue worth following
   up once the title behaviour is sorted; happy to look at it here in the same thread
   or a new one, whichever you prefer.
 * Best regards,
   Dhruv – BSF Support Team
 *  Plugin Support [Dhruv](https://wordpress.org/support/users/dpandya/)
 * (@dpandya)
 * [3 weeks, 3 days ago](https://wordpress.org/support/topic/latest-version-breaking-tags/#post-18907074)
 * Hi [@sevenstarsystems](https://wordpress.org/support/users/sevenstarsystems/),
 * Just checking in on this thread since we haven’t heard back. Were you able to
   gather any of the details we asked about, or has the workaround been sufficient
   on your end for now?
 * Since we haven’t had additional info to investigate against, we’ll mark this 
   thread as resolved for the time being. If the issue resurfaces, or if you have
   a chance to share the theme snippets or an isolated test later on, please feel
   free to reply here or open a new thread, we’ll be glad to pick it back up from
   where we left off.
 * We’ll continue keeping an eye on the related code path on our side based on what
   you’ve already shared.
 * Best regards, 
   Dhruv – BSF Support Team

Viewing 4 replies - 1 through 4 (of 4 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Flatest-version-breaking-tags%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/header-footer-elementor/assets/icon-256x256.gif?rev=3278750)
 * [Ultimate Addons for Elementor](https://wordpress.org/plugins/header-footer-elementor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/header-footer-elementor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/header-footer-elementor/)
 * [Active Topics](https://wordpress.org/support/plugin/header-footer-elementor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/header-footer-elementor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/header-footer-elementor/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Dhruv](https://wordpress.org/support/users/dpandya/)
 * Last activity: [3 weeks, 3 days ago](https://wordpress.org/support/topic/latest-version-breaking-tags/#post-18907074)
 * Status: resolved