Fed51 Posted August 8, 2009 Share Posted August 8, 2009 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 Quote Link to comment Share on other sites More sharing options...
Fed51 Posted August 12, 2009 Author Share Posted August 12, 2009 beep Quote Link to comment Share on other sites More sharing options...
YOUAREtehSCENE Posted August 13, 2009 Share Posted August 13, 2009 What are you trying to do? Quote Link to comment Share on other sites More sharing options...
Fed51 Posted August 20, 2009 Author Share Posted August 20, 2009 YOUAREtehSCENE, I've already explained what I am trying to do. What I am not trying to do is teach you how to read. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.