Every now and then complaints come in for one of my META plugins to not print out the META stuff they should. In some cases this is simply the theme not calling wp_head(). I guess this happens when you base a theme on something other than the newest default Wordpress theme …
Anyway, it happened again with andreas04-10 and I decided to “patch” it. So far I patched index.php and single.php which should be sufficient.
For patching, just download the modified andreas04-10.zip and unzip it into your wp-content/themes folder, overwriting the original andreas theme. Backup early, backup often!
Tags: andreas, theme, wordpress, wordpress-theme
April 6th, 2007 at 8:29 pm
Wow - Great response! Thank you!
Is the only change adding this line: in the index.php file?
If yes, then shouldn’t I be fine just replacing that file on my server?
That would make keeping all the changes I made to other php file easy.
April 6th, 2007 at 8:34 pm
Yes, it’s only one line in index.php. I tried to deliver it as phps but my browser always scrambled it so I guessed other people would have the same problem and zipped it all.
April 6th, 2007 at 8:35 pm
That is, I also removed the default description …
April 6th, 2007 at 9:09 pm
I ask, because I replaced my index.php file with your revised one and it still does not show the meta tags in the source view. They are there when using the default theme.
So, I uninstalled and deleted the theme on my WP installation and uploaded the whole new theme from you with your changed index file. Unfortunately, the “delete” tag I put in still does not show up in the source of the single post page when using this theme. It does show up when using the default theme. Here is a link to the page if you want to view it using the theme and look at the source. **http:/**/willtaft.com/wordpress/uncategorized/homeschool-test-post/
April 6th, 2007 at 10:04 pm
Using the default theme, the text below displays in the source of any page the post with the meta tags is displayed on. eg. the blog home page, the archives page, the category page, and the single post page. Using your copy of the revised theme, the text displays in the source of all those pages EXCEPT the single post page.
April 6th, 2007 at 10:12 pm
Sorry, I am obviously dense about posting certain types of text in these comments. The examples I have included in the last two comments are cut out when submitting? Feel free to delete that last comment that posted completely blank!
As an aside from getting your change to work with this theme, I wonder about the meta tags your plugin inserts appearing on all pages where the post is displayed. ie. if the meta tags are on the caegories, archives, blog home page, and the single post page, isn’t this seen as duplicate content by the search engines?
April 6th, 2007 at 11:59 pm
OK, I have spent some time trying to figure out why the change to the index file will not work. But, I am just not good enough at this to figure it out!
I did confirm that the theme with your change works exactly the same as the original theme. In other words, both display the meta tags in the source of all ages except the single post page.
April 7th, 2007 at 6:42 am
Ok, my bad. Normally a plugin uses header.php so there is only one place to call wp_head() and that’s good. Andreas doesn’t make much use of this. I packed a new dist with index.php and single.php modified, please test this one. I’ll be back Sunday night.
April 7th, 2007 at 6:47 am
> if the meta tags are on the caegories, archives, blog home page, and the single post page, isn’t this seen as duplicate content by the search engines?
The META description is more important for uniqueness than the keywords, and it only appears on single posts (which makes it unique). On the other pages you mentioned only keywords are printed, and they depend on the posts your pages contains. E.g., an archive page will have all the keywords of all the posts contained on that archive page. This makes it unique as long as your page is unique.
Since archive / category pages are rarely unique I recommend a noindex,follow on them. See All in One SEO Pack for one possible solution.
April 7th, 2007 at 7:06 pm
Thanks for your quick fixes! At first pass this patch seems to work as intended.
I will take a look at your SEO pack which sounds good. I did have a couple of questions about it.. and will post them over at the SEO Pack to keep things on topic.
Thanks again for this one!