Using assigned focus keyword in my template design

#95899
  • Resolved Lou
    Rank Math free

    Hi,

    I’d like to take the Focus Keyword used for any given post, and use it in the front-end for design/themeing – is this possible?

    For instance, if a post’s Focus Keyword is “red car”, I’d like to be able to include a section in the template that says “More info on red car”.

    In my mind it’d just be something I echo via PHP like <h3>More info on <?php echo rank_math_focus_keyword(); ?></h3>

    Is this possible?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for getting in touch with us.

    You can use something like this to attain that:

    <?php echo get_post_meta($post->ID, 'rank_math_focus_keyword', true); ?>
    

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Lou
    Rank Math free

    Exactly what I needed thanks.

    Sajid Khan
    Rank Math business

    Hello,

    We are super happy that this resolved your issue.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Using assigned focus keyword in my template design’ is closed to new replies.