ADAMS_Project_Tutorials_Remove_Search_Results_For_Feature

How to Remove or Edit Search Results for in WordPress

According to WIPO (World Intellectual Property Organization), Intellectual Property refers to the creation and labor of the mind, including its fruition. It could be inventions, artistic and literary works, symbols, names, images and designs used in commerce. So, when someone came up with an epic or novel artistic creations, it can be protected in various ways and in many levels. This can be Patents, Trademarks or Copyright. But what are they exactly and how are they any different?

Have you ever tried designing a WordPress website and enjoyed its flexibility, only to encounter a hurdle where elements persist stubbornly, even when you don’t need them? Well, this is a classic example of the challenges faced with modular website builders, such as WordPress, and more specifically, the well-known theme builder, Elementor Pro.

It’s all about the pre-text in search results: “Search Results For,” followed by the custom keyword entered by the user in the search bar. A seasoned WordPress designer using Elementor Pro is well aware of this. The user clicks on the search icon, enters a keyword on the website, such as “Computer” in this example, and then hits enter. The search result appears as follows:

ADAMS_Project_Tutorials_Remove_Search_Results_For_Result

Now, the problem with this pre-text “Search Results for” is that it is not editable nor removable. It will be there even if you don’t need it or want to edit it. Except maybe if you use special code to remove or edit it. Or a feature will be available in later times to edit it out.

As WordPress designer, we all want the freedom to turn things around the way we wanted it – aesthetically or functionally.

So, in this tutorial we’ll learn how to edit or remove the search results pre-text and design your search results page at will and the way you wanted it.

Note: This tutorial presumes that at least you have a working knowledge of WordPress and Elementor Pro. Also, this assumes that you have already setup your Search Results Archive Page. If you did not setup it yet, learn from here.

ADAMS_Project_Tutorials_Remove_Search_Results_For_Redundant

If you notice, the line “Search Results for:” is still there despite editing it out. It has already been redundant as I already have that text above it.

No worries, we’ll remove those texts. Carry on with the steps…

				
					/*Remove "Search Results for:"*/

function archive_callback( $title ) {
    if ( is_search() ) {
        return get_search_query();
    }
    return $title;
}
add_filter( 'elementor/utils/get_the_archive_title', 'archive_callback' );
add_filter( 'elementor_pro/utils/get_the_archive_title', 'archive_callback' );
				
			
ADAMS_Project_Tutorials_Remove_Search_Results_For_Pasted_Edited
ADAMS Project Tutorials Remove Search Results For Done Corrected

Head back to your website’s front-end and do a search.

Notice that the pre-text “Search Results for:” is no longer there.

Note: This tutorials has some variability in it. This may work or may not for you depending on your system setup, versions and applications. So check out for yourself. WordPress is dynamically updating the system, this is one thing you need to check as well.

Enjoy!

SHARE

RELATED POSTS

ADAMS_Project_Tutorials_How_to_Re-Assign_Nameservers_Feature

How to Re-Assign Nameservers and Things You Should Know

Re-Assigning Nameservers is just a process of redirecting the address to another hosting provider so that files will be solicited from the target hosting site. This happens if your domain registry, such as Web Central or GoDaddy, doesn’t have hosting service available. But mostly, almost all domain registries or hosting providers by now do have all this in one place. Which means, where you registered the domain, there will be a corresponding hosting service at your beck and call.

Read More

COMMENTS

Leave a Reply

Your email address will not be published. Required fields are marked *

SEARCH

ADAMS_Project_Mail_View_Sent_Icon_

Subscribed!

Thank you! Get it first and right. Rest assured of the latest news from us.

ADAMS_Project_Mail_View_Sent_Icon_

Message request sent!

Thank you!

Rest assured that your information is treated with utmost care and confidentiality as we want same thing done unto us.

Our reply to your message will be darting towards you at the speed of light!

ADAMS_Project_Mail_View_Sent_Icon_

Quote request sent!

Thank you!

Rest assured that your information is treated with utmost care and confidentiality as we want same thing done unto us.

Your custom quote will be darting towards you at the speed of light!