Return to Snippet

Revision: 60197
at October 25, 2012 08:37 by itsmrchris


Initial Code
/*--------------------------------------*/
/* Use WP SEO Focus Keyword in PHP
/*--------------------------------------*/
if(!function_exists('wpseoFocusKW'))
{
		function wpseoFocusKW()
		{
			$focuskw = wpseo_get_value('focuskw', $post->ID);
			echo $focuskw;
		}
}

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

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

<?php wpseoFocusKW();?>

Initial Title
WP Yoast display Focus Keyword

Initial Tags
php, wordpress

Initial Language
PHP