Articles of search

How to add css classes to widgets?

I need to add a class to the WordPress search widget. How would I go about doing so? I’m calling it from the admin side, as in dragging and dropping it into the sidebar at the widgets page of the admin section. I’m not calling it using get_search_form. I want to do so by using […]

Searching post types

Is it possible to take a user input from a search form, use that to search a custom post type via the WP_Query class and then redirect the user to a page template to display the results? For example, Assume you have a search input that takes city, state or zip You then enter in […]

WP + Google analytics = /search?

I finally found some time to tweak our business site. After digging some Google Analytic data I found out a portion of our users goes to “/search“. Problem is: We don’t offer a search function on our site as we aren’t a webshop. Does anyone know why or how WordPress sends to /search? Is this […]

Filter keywords from search query

I have search over the google, somewhere out there and here(http://wordpress.stackexchange.com). But, i can’t seem to get the solution i was looking for. I would like to ask that, is there any solution which allows me to exclude the words i wanted to filter from search queries? Example: when visitors using my search box, they […]

Remove Page Timestamp via functions.php so it doesn't show in Google Search Result Description

I want to remove the last updated / last modified date from pages (not posts) via functions.php (could this be done by making that hook __null?) The goal is to remove the google search result description date time stamp that shows up because of the date modified code. I only want the function to run […]

Filter out a meta key in the Search results page with two CPT

I have two CPT: Listings and Events. In Events I have custom fields for the start and end dates. What I need is a way to filter out any events that are past the current date. What I have right now is: function search_pre_get_posts( $query ) { if ( is_search() && $query->is_main_query() ) { $currentdate […]

use a custom page to display search results

I would like to display the wordpress search results on a page which I’ve created in the wordpress backend. I need a page, because I’ve custom content on this page which should be changed by backend users. So I can’t just use the search.php file. I’ve created a page in the backend and assigned a […]

adding more text to a query string

On a site I am developing, I need a “special search” function. The search page is called with a search query from a form with _GET parameters like this : http://example.com/s=searchstring&s1=s1text1&s2=s2text1&s2=s2text2 In the search page itself (where the result will be), how can I concatenate the s1 and s2 arguments so the results for wordpress […]

How to use another file instead of home.php

I have an Elegant Estate Theme and I am using Multiple Category Selection to display some posts, the Result Page is displaying the Feature SlideShow on the top, and I want to eliminate this; I want it to work just as WordPress Search displays the result (without the Feature Slider). I found out that the […]

$_POSTing to and modifying the WP search results page

I have a site which uses post-name permalinks. If I use the built in search I am taken to the url www.mysite.com/search/searchterm I have a form which I am using as a custom search popup built into a page $url = ‘/search’; <form id=”signup” method=”post” action=”‘ . $url . ‘”> <input name=”search_input” type=”text”> <button type=”submit”>Search</button> […]