Hello,
We apologize for the issue you are facing with Elementor and Rank Math on your website. By default, Rank Math does not support Elementor templates as they are not considered actual pages or posts. This can lead to conflicts or issues when trying to optimize your Elementor templates for SEO.
To enable Rank Math SEO on Elementor templates, you need to add a specific filter to your theme’s rank-math.php
file. Here’s how you can do it:
-
Add the Filter: You can add the following code snippet to your theme’s rank-math.php
file:
/**
* Filter to enable Rank Math SEO on Elementor templates
*/
add_filter( 'rank_math/excluded_post_types', function( $post_types ) {
$post_types['elementor_library'] = 'elementor_library';
return $post_types;
}, 11 );
Make sure to create a child theme for this modification to avoid issues with your main theme.
-
Accessing the Theme File Editor:
- For classic themes, navigate to WordPress Dashboard → Appearance → Theme File Editor.
- For block themes, go to WordPress Dashboard → Tools → Theme File Editor.
-
Create or Open rank-math.php
: If you don’t have a rank-math.php
file in your theme’s directory, create one in the path wp-content/themes/theme-name/rank-math.php
, where theme-name
is your active theme.
-
Add PHP Opening Tag: Ensure you add an opening PHP tag at the beginning of the file: `
Sources:
Enable Rank Math SEO on Elementor Templates » Rank Math
Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
Can you please share some more details about the issue you’re facing with Rank Math and Elementor? You can also share a screencast of the issue by using a tool like https://loom.com so that we can check this further for you. A visual representation of the issue will help us to understand it better.
Looking forward to helping you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.