%focuskw% Insert Inside Post

#115261
  • Resolved Efeikomwan Obasuyi
    Rank Math free

    Hello, sorry for my English.

    Please is it possible to automatically insert focus-keyword in post content using rankmath shortcode “%focuskw%”?

    Example below is for yoast seo plugin.

    If you want a shortcode for Yoast to output the keyphrase automatically:

    function wpso_61018203_output_yoast_keyphrase() {
        // Make sure Yoast is installed/active.
        if ( class_exists( 'WPSEO_Meta' ) ) :
            // Hold the global post object.    
            global $post;
    
            return WPSEO_Meta::get_value( 'focuskw', $post->ID );
        endif;
    }
    
    add_shortcode('yoast_kw', 'wpso_61018203_output_yoast_keyphrase' );

    You can then do this [‘yoast_kw’] in your content, or use echo do_shortcode(‘[yoast_kw]’); in your template.

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

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for the delay and for any inconvenience this issue may have caused you.

    Unfortunately, we don’t have that option. You may need to add the exact keywords to your post content manually.

    Thank you and please don’t hesitate to contact us if you need further assistance.

    Okay. Thank you…

    Hello,

    If you need further help or with anything else, please open a new support ticket here so we can help.

    We are always here for assistance.

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

The ticket ‘%focuskw% Insert Inside Post’ is closed to new replies.