Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 page improvements #1168

Merged
merged 4 commits into from
Mar 17, 2016
Merged

404 page improvements #1168

merged 4 commits into from
Mar 17, 2016

Conversation

benlk
Copy link
Collaborator

@benlk benlk commented Mar 11, 2016

Changes

  • When used on a search page, the search form partial will display the search query. (Does not affect the header search; that does not use searchform.php
  • The 404 page shows an optional text message supporting basic HTML under the search form, which is set in the theme options under Advanced options.
  • partials/content-not-found displays the 404'd URL in a <code> element before the search box if the page is a 404. Otherwise, it continues to display "Apologies, but no results were found. Perhaps searching will help.'"

Here's an example with a successful search, showing the query in the search box:

screen shot 2016-03-10 at 5 13 31 pm

An unsuccessful search, showing a different text suggesting running a different search:

screen shot 2016-03-10 at 5 18 01 pm

A 404 page, showing the requested URL:

screen shot 2016-03-10 at 5 19 52 pm

A 404 page on a child theme, showing custom text and HTML tags in use:

screen shot 2016-03-10 at 5 22 08 pm

A hierarchical taxonomy term, showing the content-not-found partial used on 404 and empty search pages in the river, because the term has fewer than 5 posts.

Why

For #692 and WE-103.

This is a hotfix because of the rapidity with which it is desired.

@benlk
Copy link
Collaborator Author

benlk commented Mar 11, 2016

This is separate from and complementary to #1167, which may be updated to work with this code at any point.

@benlk benlk assigned rnagle and unassigned aschweigert Mar 14, 2016
@benlk
Copy link
Collaborator Author

benlk commented Mar 16, 2016

Updated to display the Recent Posts widget with empty args:

screen shot 2016-03-16 at 10 44 45 am

aschweigert added a commit that referenced this pull request Mar 17, 2016
@aschweigert aschweigert merged commit 30957f8 into master Mar 17, 2016
@aschweigert aschweigert deleted the WE-103-better-404-page branch March 17, 2016 12:53
@aschweigert
Copy link

Sorry, should have looked more closely at this. I'm not necessarily opposed to using wp_kses here (although I think it's overkill) but if we do it here...why aren't we using it for every text field in the theme options? For category/term descriptions? Everywhere else? It would make a lot more sense to have a globally allowed list of tags for user-entered description text. It's weird to make this the only exception and then it also makes the docs here way too heavy-handed. This should be re-thought.

@benlk
Copy link
Collaborator Author

benlk commented Mar 17, 2016

Created new ticket for that question: #1172

benlk added a commit that referenced this pull request Mar 17, 2016
- This uses the copy of lang/es_ES.po from master instead of merging
- Rebuilt translation files with `grunt pot shell:msmerge`
- Rebuilt css with `grunt less cssmin`
- Resolves conflict in `searchform.php` from difference between \#1168 and \#1167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants