#35570 closed feature request (worksforme)
Search for Post/Pages isn't working
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4.1 |
Component: | Query | Keywords: | |
Focuses: | administration | Cc: |
Description
On Dashboard goto either Pages or Post.
Then type something in the input on the right side and click on the button right to it. In the german version it is called "Beiträge durchsuchen" for Posts and "Seiten durchsuchen" for Pages.
Regardless of what your fill in, it seems that no search is executed.
Please fix it asap.
Change History (5)
#1
follow-up:
↓ 2
@
9 years ago
- Component changed from General to Query
- Keywords reporter-feedback added
#2
in reply to:
↑ 1
@
9 years ago
- Keywords close added
- Resolution set to worksforme
- Status changed from new to closed
- Type changed from defect (bug) to feature request
Replying to SergeyBiryukov:
Hi @mumbomedia, welcome to Trac!
I could not reproduce the issue on a clean install. Does it still happen with all plugins disabled and a default theme (Twenty Sixteen or Twenty Fifteen) activated?
-No, I did the changes you've suggested step by step.
- I deactivated all plugins -> Result: No changes
- I switched to default theme Twenty Fifteen -> Result: Search is working
- I switched back to my parents theme -> Result: Search is working
Thanks to you I found the code that is causing it.
I have deactivate the search in the functions.php of my child theme, because I don't want to use the default search on the frontend (users view). But on backend (admins view) the search should work as expected. So I have to determine if the request cames either from front- or backend. I will look in the codex if there is a function which tells me if I am on front- or backend.
Update:
I've found the function I was looking for is_admin. I've alter my if-statement to if(is_search() && !is_admin()) and now it works like a charm.
Hi @mumbomedia, welcome to Trac!
I could not reproduce the issue on a clean install. Does it still happen with all plugins disabled and a default theme (Twenty Sixteen or Twenty Fifteen) activated?