A
A
Alexey Chumachenko2018-07-18 22:27:46
WordPress
Alexey Chumachenko, 2018-07-18 22:27:46

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

2 answer(s)
Y
Yunus Gaziev, 2018-07-19
@help2018

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

register_post_type()

L
La1serg, 2018-07-18
@La1serg

I myself have not used this plugin, but I assume that it searches not only for the title of the document, but also for the content.
Go to the plugin settings and configure it to search only by the name of the posts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question