Not sure whether this can be called a bug or whether it is by design, but I encounter some unexpected behaviour for this plugin on 404 pages.
WordPress SEO 18.104.22.168
Breadcrumb and title for invalid day/month/year archive page and other 404 pages
What I did/how to reproduce the issue:
I wanted to test the page users would be presented with when they visited a date-archive for a day/month/year in which no blogposts where published and for a non-existant category/article.
I tried both of the following as a 404 title template (for the non-date based pages):
You looked for: %%searchphrase%% %%sep%% %%sitename%%
You looked for: %%title%% %%sep%% %%sitename%%
On one of your own blogs, try for example:
What I expected to happen:
That the title would say:
- 11 april 1995 – my blog name
- april 1995 – my blog name
- 1995 – my blog name
- You looked for: test – my blog name OR
- You looked for: test – my blog name
And that the breadcrumb would show:
- Home -> Blog -> 11 april 1995
- Home -> Blog -> april 1995
- Home -> Blog -> 1995
- Home -> Error 404: Page not Found => this is done as expected
What did happen:
For the date based pages:
The title came back as the 404-title
The breadcrumb, similarly, showed the 404 breadcrumb message
For the non-existant category/article pages:
The title came back as:
You looked for: – my blog name – i.e. the phrase/slug/category/article name isn’t there
I’ve worked out how to patch this and created the code based on the current development version of the plugin.
Please find the patch in the form of find & replace php-code here: http://pastebin.com/w0EPBa5S
Please accept this patch as a compliment to your excellent work 😉
Hope this helps!
- The topic ‘[Plugin: WordPress SEO by Yoast] [Bug? Fix] for title and breadcrumbs of 404 pages’ is closed to new replies.