focus keyword

#249994
  • Resolved Mastersinwp
    Rank Math free

    We have integrated the codes int function PHP. Where can i see if the focus keyword is showing. We have lot of products and categories.

    Also we have a lot of clients with webshops. so we wanne let this work and do this on all of them

Viewing 8 replies - 1 through 8 (of 8 total)
  • Prabhat
    Rank Math agency

    Hello,

    Thank you for contacting us.

    Could you confirm if you mean that you’ve added the code for automatically adding the focus keyword in your functions.php file?

    If yes, you can open the post/page/products list and see if the focus keyword is displayed in the SEO Details column.

    Please have a look at this screenshot for a quick reference: https://i.rankmath.com/6uaskD

    Hope this helps.

    Thank you.

    Yes i mean indeed that code.

    the keyword is not showing in the column.

    Can you check if we did it correctly?

    Anas
    Rank Math business

    Hello,

    Please check that you have added the post type correctly in the code.

    If you want to add the focus keywords to the product, change the post type to “product”.

    function update_focus_keywords() {
    	$posts = get_posts(array(
    	'posts_per_page'	=> -1,
    	'post_type'		=> 'product' //replace post with the name of your post type
        ));
    	foreach($posts as $p){
    		update_post_meta($p->ID,'rank_math_focus_keyword',strtolower(get_the_title($p->ID)));
    		
    	}
    }
    add_action( 'init', 'update_focus_keywords' );

    After adding the code, clear the website cache and check again.

    I hope this helps. Looking forward to helping you.

    it is still not working

    do i need the pro version for that?

    Prabhat
    Rank Math agency

    Hello,

    No, it should work with the Free version too.

    We might need to take a closer look at the issue. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Ok, we will first do the last changes in the site, take a backup, and then i give you acces

    Prabhat
    Rank Math agency

    Hello,

    Sure, and in the meantime, if there’s anything else that we can assist you with, please let us know.

    Thank 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.

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

The ticket ‘focus keyword’ is closed to new replies.