Introduction
Have you just got a message from ahrefs or some other SEO tool that you have 2 meta descriptions on your WordPress site?”, you’re not alone. This issue often arises when using the Hello Elementor theme alongside an SEO plugin like Yoast or Rank Math. In this article, we’ll explore how to resolve this issue by disabling the built-in meta descriptions in Hello Elementor.
The Problem: Duplicate Meta Descriptions
The Hello Elementor theme comes with built-in meta descriptions, which can be helpful for SEO. However, if you’re also using an SEO plugin, you’ll end up with duplicate meta descriptions. This is why you may find yourself asking, “Why do I have 2 meta descriptions?”
The Solution: Disabling Built-in Meta Descriptions
To avoid this issue, you’ll need to disable the built-in meta descriptions in the Hello Elementor theme. This will allow your SEO plugin to take over and manage the meta descriptions for your site.
Where to Add the Code
To disable the built-in meta descriptions, you’ll need to add the following code to your theme’s functions.php
file:
function remove_hello_elementor_description_meta_tag() {
remove_action( 'wp_head', 'hello_elementor_add_description_meta_tag' );
}
add_action( 'after_setup_theme', 'remove_hello_elementor_description_meta_tag' );
This code removes the action that adds the meta description tag, ensuring that only your SEO plugin will handle this task.
You can access the functions.php
file by navigating to Appearance > Theme Editor in your WordPress dashboard. Make sure to backup your site before making any changes to the code.
Also. When you have pagination you have to tell your SEO plugin in the settings that there are several pages to the meta description. In Yoast SEO you put %%page%% in the meta description box.
Conclusion
Understanding why you have 2 meta descriptions is the first step in resolving SEO conflicts between your theme and plugins. By disabling the built-in meta descriptions in Hello Elementor, you can ensure that your SEO plugin effectively manages your site’s meta descriptions.
For more details, you can read the official documentation
One Response