🔸 Access RANKMATH SEO data in Elementor (Pro) ?

  • Resolved Surendra.S
    Rank Math free

    Is it possible to access & display RANKMATH’s SEO data in Elementor (Pro) ?

    For eg, I want to access & display RANKMATH’s SEO TITLE & PRIMARY FOCUS KEYWORD etc details in a Post (using Elementor)

    So would like to know which (custom) fields RANKMATH stores them ?

    • This topic was modified 3 years, 6 months ago by Surendra.S.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    Thank you for contacting Rank Math today.

    I am not able to understand how you wish to use the title. Allow me to consult the dev team it is possible to access and use these variables.

    Looking forward to helping you. Thank you.


    When making a Single Post Template in Elementor, it will be useful if I can access this SEO Title and display this SEO Title instead of Normal Title of the Post.

    Similarly if I can access & display Primary Focus Keyword in 2-3 appropriate places of Post Content, it may help SEO.

    If I can access these through some Custom Fields or Variables in Elementor, then I wont need to write these manually in every Post.

    Hope I am clear.


    Rank Math plugin stores SEO Title & Focus Keyword in postmeta table in rank_math_title & rank_math_focus_keyword key. You can use WP’s get_post_meta() function or following code to get theses values:

    SEO Title: RankMath\Paper\Paper::get()->get_title();
    Focus KW: RankMath\Paper\Paper::get()->get_keywords();

    I hope that helps.

    Thank You ! That helps to some extent.

    So, I understand access to these are possible through Code (as mentioned above).

    Can you confirm if the same are available in Elementor (Pro) interface through any variables ?

    I am asking because RankMath provided the Integration with Elementor, but I am not sure if this is possible.


    Rank Math is compatible with both Elementor & Elementor pro and it has variables like %title%, %description%, etc which will work when added in the SEO fields in the SEO section.

    Can you please tell us where exactly do you want to use the Title and other variables?

    Looking forward to helping you.

    I have Custom Post Type that I display as per ‘Single Post Template’ made in Elementor.

    So, in this Single Post Template (Elementor), if I can access Rankmath’s data (for eg, Focus Keyword), I can display the same in 2-3 places of Template.

    So that, it will save me effort of adding Focus Keyword in content of every Custom Post manually. (SEO purpose)

    Similarly, instead of regular Post Title, I can choose to display Rankmath’s SEO Title.

    For eg, I have Custom Post Type ‘Jobs’ & it has Custom Fields (using ACF).

    Now, I post multiple jobs, and set Rankmath SEO data (Meta Title & Focus Keyword) accordingly for each job.

    The display of all these jobs (front end) is done by Elementor’s Single Job Template.

    In this template, I want to display the Focus Keyword that I already set for each job.

    So that, when viewing any Job posting (in front end), the Focus Keyword can be seen at 2-3 places inside the content.

    Not sure if I explained clearly 😉


    I have updated the sensitive data as requested. Can you please check further?

    Thank you.


    To show Focus Keyword in the content, you can create a new shortcode or add a placeholder in content and convert it using the_content filter. Following is an example of how it can be done using a shortcode:

    add_shortcode( 'rank_math_focus_keyword', function( $atts ) {
        if ( ! is_singular() ) {
            return '';
        return get_post_meta( get_the_ID(), 'rank_math_focus_keyword', true );
    } );

    After adding this code in functions.php file, you can use [rank_math_focus_keyword] shortcode to show Focus Keyword.

    I hope that helps.


    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.

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

The ticket ‘🔸 Access RANKMATH SEO data in Elementor (Pro) ?’ is closed to new replies.