How to change text on get_search_form()

Looking at your code block it appears you’re trying to translate the text in the button and the placeholder. You’re going about it all wrong: WordPress already allows for strings like that to be translated into any language. The easiest way is to visit Settings > General and pick the language you want to use … Read more

Display search results within the same page in wordpress

Can you explain how did you put the search form? Are you working in code or with any page builders? Assuming you are using code, best case is to use Javascript / Ajax to search in the same page. Other options include submitting the search form and reloading the page with data. You can add … Read more

Google indexing pages that are not used

You should enter the editor of your pages, and as you see for example here, on the right side settings you can control their “visibility”. Change that to “private”, and then Google won’t see them. Once Google will reindex your pages, these should disappear from its search results. And until then, visitors will see a … Read more

Customize search_filter($query) function

OK. I have changed $query->set(‘orderby’, ‘type’) function search_filter($query) { if ($query->is_search && !is_admin()) { $query->set(‘post_type’, array(‘post’,’forums’)); $query->set(‘category_name’, ‘my-zen’); $query->set(‘orderby’, ‘date’); $query->set(‘order’, ‘ASC’); } return $query; } add_filter(‘pre_get_posts’,’search_filter’); Now, I don’t have any Error critical, but it doesn’t work. What is wrong in my code?