Hey All,
I wrote on here a while ago about my images not being indexed by Google. I've had my site with Wordpress and Zenphoto for a few months now. After the last WP upgrade every image page in my gallery came back as 'nothing found for...' in the browser title bar. I worked around it by changing the browser bar format.
Using Google Webmaster I noticed that all of my gallery pages come back as 404 errors. Despite that, I can see the images perfectly fine.
Obviously I'm doing something wrong!
To start with...
My robots.txt is set to allow. My ZP is inside my WP directory. I use a custom permalinks format - 'category/postname'.
The url to my gallery is
http://phauxshow.com/gallery/I'd really appreciate any advice!
Thanks,
Pierrot
Comments
Can anyone shed some light on this?
I still haven't been able to figure it out. Perhaps the ZP developers can assist?
Not sure, but I've got a hunch that it has something to do with the index file. What I did was rename my index.php file in my zenPhoto installation to default.php and then edited the .htaccess file in order to call it. By doing that, the 404 error changed to 200 OK on the default.php page only. I'm still getting 404's for my albums and images though. So yeah, I'm still pretty much in the dark.
It seems like the error is being caused by the WordPress is_404 function. Whenever I try to use that function on an included zenphoto page, it returns as True. Pretty permalinks are also tied into that function in parts, so I'm guessing that's why by turning them off, the pages don't give the silent 404 error.
So going with that information, I've managed to figure out two possible solutions.
#1. Editing the is_404 function. I've really got no experience messing with WP core files, so I really didn't want to do this. Here are two links that I've found about the problem.
http://ddhr.org/2005/11/29/wordpress-functions/
http://andy.wordpress.com/2006/08/13/useless-code-in-wordpress-themes/
#2. The easiest "solution" is just to add:
`header("HTTP/1.1 200 OK");
header("Status: 200 OK");`
above wherever it is you're calling WordPress' get_header(); function in your zenphoto template.
http://wordpress.org/support/topic/84233?replies=2
You're a genius! I'll test it out right away!
On a different note - I rebuilt my theme without using Ruzee's header include and I still get the 404's
I really wish there was a better, less "hackish" fix for this.