Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #35570, comment 2


Ignore:
Timestamp:
01/25/2016 09:42:09 AM (9 years ago)
Author:
mumbomedia
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35570, comment 2

    initial v1  
    1212I 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.
    1313
    14 If your have any idea how to solved this feel free to let me know it.
     14Update:
     15I've found the function I was looking for [https://codex.wordpress.org/Function_Reference/is_admin is_admin]. I've alter my if-statement to if(is_search() && !is_admin()) and now it works like a charm.