Answer the question
In order to leave comments, you need to log in
Looking for custom post types in wordpress?
Good evening. I use the Search Everything plugin to search for custom post types. But when I do a search, a link to the main page appears as a result of the search. is there any way to make it so that instead of a link the searched content would be displayed? (This content is on the main page) Thank you in advance for your help. link to the site m5015334.beget.tech/. if you type in the search, you will see that it simply gives a link to the main page
Answer the question
In order to leave comments, you need to log in
What is the URL of the search form? For the search to work, you need the s parameter in the query string + I understand ) You do not have a search template search.php , so you are thrown to the main page. WordPress always throws it back to home if the requested template is missing.
Here is the information to study The theme (template) file hierarchy
UPD
For a custom post, you need to check the parameters
'public' => true,
'publicly_queryable' => null, // зависит от public
'exclude_from_search' => null, // зависит от public
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question