I'm trying to use post content as meta keywords content
It will insert the meta tag into the head just fine, but content="" is empty
Here's the code so far:
function autokeys() {
if (is_single())
{
echo '<meta name="keywords" content="';
}
foreach((get_the_content()) as $post)
if (is_single())
{
echo $post->post_content;
}
if (is_single())
{
echo '" />';
}
}
add_action('wp_head', 'autokeys');
any help would be much appreciated.
also, if you know how to only use the first XX number of characters or words, a tip on that would be handy as well
thanks in advance,
da fed