Opened 14 months ago
Closed 13 months ago
#20435 closed defect (bug) (fixed)
Search result body classes not always applied
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | Template | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: |
Description
On search results pages a body class of 'search' is applied. This is correctly applied when is_search() is true.
A body class of 'search-results' and 'search-no-results' is also applied according to whether or not there are any results.
However, these two body classes are applied in an else block after a check for is_archive(), so this means if you filter your search results by post type (eg. s=my_search_term&post_type=my_post_type) then the 'search-results' and 'search-no-results' body classes are not applied because is_archive() is true.
Patch coming up.
Attachments (1)
Change History (4)
johnbillion — 14 months ago
comment:1
johnbillion — 14 months ago
- Keywords has-patch added
Note: See
TracTickets for help on using
tickets.

Patch