🎃 [HALLOWEEN SALE] DISCOUNT! + 2x Benefits + $15k Worth of Offers for FREE

LEARN MORE!

Enable Rank Math SEO on Elementor Templates

If you’re adding content to Elementor templates, you may need to optimize your template for SEO with Rank Math, just like a post or page. Rank Math, by default, excludes support for Elementor templates as they are not actual pages or posts; hence we need to extend Rank Math support for Elementor templates.

How to Enable Rank Math SEO on Elementor Templates?

In this knowledgebase article, we’ll show you how you can enable Rank Math SEO on Elementor templates.

1 Add the Filter

To enable Rank Math’s Integration on Elementor Template pages, please add the following filter to your theme’s rank-math.php file.

We recommend using a child theme for implementing the code snippet. Because if any error has been committed while modifying or applying changes to the main theme file, then there can be a possibility that the whole site will get corrupted.

You can create a child theme by using a plugin called Child Theme Configurator. If you use a classic theme, navigate to the Theme File Editor from WordPress Dashboard → Appearance.

Navigate to Theme File Editor

If you are using a block theme, then you can find Theme File Editor under the Left side of the WordPress Dashboard → Tools → Theme File Editor.

Theme File Editor in Block Theme

If you haven’t already created a rank-math.php file in your theme’s directory, you can create one in the path wp-content/themes/theme-name/rank-math.php where the theme-name denotes the actual theme installed and activated on your site.

Open rank-math.php in WordPress Theme Editor

Don’t forget to add an opening PHP tag to the beginning of rank-math.php file: <?php. There must be no spaces or empty lines before it.

Now add the following snippet code to the 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 );

And finally, update the changes.

Add the code snippet to rank-math.php file

2 Navigate to Tiles & Meta Settings

Once you’ve added the above code snippet and saved the changes, you’ll see a new tab with the label My Templates when you navigate to Rank Math SEO → Titles & Meta inside your WordPress Dashboard. Navigate to the My Templates section.

My templates in Rank Math Titles & Meta

3 Enable SEO Controls for Elementor Templates

As you scroll down a bit, you can find the option ‘Add SEO Controls‘. Enable this option to add the Rank Math SEO Meta box to your Elementor templates.

Add SEO Controls

And then click the Save Changes button.

Click save changes

Once you’ve enabled this option, you can notice the Rank Math SEO Meta box available on your Elementor templates under the SEO tab.

Rank Math SEO tab for Elementor templates

Now you can use Rank Math to add a focus keyword, optimize the content or take advantage of Schema Markup, etc., in your Elementor templates, just like any post or page.

And that’s it! We hope the tutorial helped you enable Rank Math on Elementor templates. If you still have any questions, feel free to reach our support team, as we’re always here to help!

Still not using Rank Math?

Setup takes less than 5 minutes including the import from your old SEO Plugin!

Learn more about the PRO Version

Still need help?

?

Submit Your Question

Please give us the details, our support team will get back to you.

Open Ticket

Related Articles