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 Link to comment https://forums.phpfreaks.com/topic/169403-wordpress-plugin-seems-ok-but-broken/ Share on other sites More sharing options...
Fed51 Posted August 12, 2009 Author Share Posted August 12, 2009 beep Link to comment https://forums.phpfreaks.com/topic/169403-wordpress-plugin-seems-ok-but-broken/#findComment-896706 Share on other sites More sharing options...
YOUAREtehSCENE Posted August 13, 2009 Share Posted August 13, 2009 What are you trying to do? Link to comment https://forums.phpfreaks.com/topic/169403-wordpress-plugin-seems-ok-but-broken/#findComment-896946 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. Link to comment https://forums.phpfreaks.com/topic/169403-wordpress-plugin-seems-ok-but-broken/#findComment-902876 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.