WP Yoast display Focus Keyword


/ Published in: PHP
Save to your folder(s)

Add this to functions.php and then you can call the focus keyword anywhere you want with:

<?php wpseoFocusKW();?>


Copy this code and paste it in your HTML
  1. /*--------------------------------------*/
  2. /* Use WP SEO Focus Keyword in PHP
  3. /*--------------------------------------*/
  4. if(!function_exists('wpseoFocusKW'))
  5. {
  6. function wpseoFocusKW()
  7. {
  8. $focuskw = wpseo_get_value('focuskw', $post->ID);
  9. echo $focuskw;
  10. }
  11. }

URL: http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-using-the-focus-keyword-in-php

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.