Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [search]

The method by which users find information on your WordPress site

0
votes
2answers
17 views

Hi everybody, I have a problem of search box

I just finished my site with the theme "shopper" on wordpress with the woocommerce extension. There is a search bar in the header that I can not remove. this bar offers in English to search in ...
0
votes
0answers
12 views

Adding a search function for one list in one section of one page

Currently working on a website that has an index of domains organized alphabetically, and in tabs that span multiple letters. It's a Wordpress site using the Divi theme. I want to create a search ...
1
vote
0answers
11 views

How to sort by columns within a search result without displaying all rows again after sorting

I want to display a WP_List_Table on a submenu_page and offer a search function. The display of the data works so far and also the search, but the column sorting causes problems. If I click on the ...
1
vote
0answers
10 views

Rewrite: WordPress URL rewrite on Search

I am trying to create a URL rewrite in wordpress. I am creating a search from through wordpress. The URL structure I currently have is the following: http://localhost:8888/?post_type=CustomPost&s=...
1
vote
1answer
21 views

Edit css for search results page

I have a search results page with a template call content-search.php. Basically what this file does is to display the results after a person searches something on the search bar, and i would like to ...
0
votes
2answers
38 views

Re-order search results with posts_orderby filter and post meta value

I'd like to re-order the search results based on post meta and date . The post meta key is _prioritize_s and the value isn't important. So in a "normal" meta query, I'd just write the compare ...
0
votes
0answers
13 views

search and filter with custom post type and custom fields

I want to put a filter system in my website that contain a search input and list of states, if I choose a state without writing in input it'll give me all posts in that state and if I search for ...
0
votes
1answer
26 views

How to Display Search Results with any Page/Post

I'm not really sure where I should ask this question so here I am. I have a website that is split into three parts from left to right: Menu (div name "sidebar"), Center Blue (div name "center"), and ...
0
votes
1answer
37 views

Display Search Results by tag_ID in my search.php

I have my search.php working fine. But I'd like to display the search results in my search.php filtered by tag_ID when is coming from another search form. I've tried several things like: wp_parse_str, ...
0
votes
0answers
14 views

Removing &submit=Search from search parameters?

I added the search feature to my site using: <?php get_search_form(); ?> I notice on the search page, after ?s=value, there is also &submit=Search Is there a way to remove this through ...
0
votes
0answers
8 views

get searched results in different languages

I have a contact form on my site. The next code <form role="search" method="get" id="searchform" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> doesn't allow me to ...
0
votes
0answers
13 views

create to search column

i m create to custom post type shortcode but at the last i m trying to add Individual column searching in my table but i can't access.. this is my post_type_shortcode.php <?php function ...
-1
votes
1answer
36 views

How To Change Url Doing Some Changes in Search Form

How can url show like i want or prefix text in search query form class="search" action="/search"> input type="hidden" name="type" value="product" /> input type="text" placeholder="Search ...
0
votes
1answer
12 views

Admin: WooCommerce Navigation Menus do not show empty categories search tab

I have been searching and finally found a question that answers my question: How to show empty category in admin menus search https://core.trac.wordpress.org/ticket/45298 How could this be ...
0
votes
1answer
20 views

Search Results No Link

The search results page is not showing a link that the user can click on. I am needing the heading to be the link. Does anyone know what the issue might be? Below is my search.php and content.php ...
0
votes
0answers
9 views

increase performance in search for wp query with meta query

Currently the user can search for: Type, Make, Mileage [Min, Max] and color. He can search only one, or more than one, or all, as he prefers. I started developing for WP a short time ago, the code I ...
0
votes
0answers
28 views

How to Integrate Live search in WordPress?

I tried most of the available plugins to integrate Live Search in WordPress, but all of them messed up my theme layout. The search function in my site is from a small search box at the top right ...
0
votes
1answer
18 views

Accounting for search terms that may include a space, using SearchWP

As the title suggest I am having an issue with setting up the plugin SearchWP to correctly work with search terms (product names) that may, or may not, contain spaces. e.g. "ABC1" or "ABC 1". I am ...
1
vote
1answer
28 views

Including metaboxes from custom post types in global search — continued

I've seen several questions about including the content of meta-fields in a wordpress search. My question is not a duplicate of these. Background The issue I'm having stems from how meta queries ...
0
votes
1answer
31 views

Custom post type not showing in search result

I have a custom post type that I would like to be searchable (I use the relevanssi search plugin). I have the following code to add the custom post type: add_action('init', 'eyewebz_create_post_types'...
0
votes
1answer
19 views

wordpress ajax search posts

I tried to configure search area in wordpress using ajax, so i add this code into functions.php <?php // the ajax function add_action('wp_ajax_data_fetch' , 'data_fetch'); add_action('...
0
votes
0answers
8 views

Merging results from (new wpdb) from subdomain forum database with search results on main site search

I've looked at quite a few similar posts but no-one seems to be attempting the same thing as me here. The search page is on the main wordpress site mainsite.com/s=the_query. The forum is at mainsite....
0
votes
0answers
8 views

include product variants in woocommerce search - the hanger theme

I am using the hanger theme for my woocommerce shop. The search function of the theme doesnt include products variants. Which is a huge problem for our shop. I figured out that Smart WooCommerce ...
1
vote
2answers
110 views

How to create a WP_Query to search the Title or Tag?

I have created a search using WP_Query, it seems like this query is looking for the queried term in title AND tags. Is there a way to have this search the title OR tags? $s = $request['s']; $tags = ...
0
votes
0answers
16 views

Wordpress search with accented words

I'm looking for a way to filter words that contain accents or why WordPress by performing a search with a word that contains an accent, both in the front and in the backoffice, redirect me to the home ...
0
votes
1answer
15 views

Map plugin with proximity search compatible with Buddypress

I need to be able to display Buddypress users on a map while allowing proximity/distance searches but my research yielded in plugins with subpar docs and absence of an online demo to help reassure me ...
0
votes
0answers
19 views

Exclude product content from woocommerce search

I want to exclude the product content from woocommerce search. I tried the following code in my theme functions.php but it not works: if( ! is_admin() ) { function wpb_search_filter( $query ) { ...
0
votes
1answer
18 views

Group search results by post type, but hide post types with no results

I was looking for a clean way to group my search results by posttype. I currently have 3 post types: Page, Post and Glossary. After a long search this answer in this thread got me what I needed. The ...
1
vote
1answer
12 views

Assigning a meta_query value based on regexp to wp_query fails

I have a text that is submitted to search on a wordpress site: "text123". From this text I would like to extract a number consisting of 3 digits (123) and search for the post that has a 'key' = '...
0
votes
1answer
8 views

Finding a page holding a specific string/URL that is used in the content

In my situation do I want to find pages that have a URL in the content of the post that is redirecting to a 404 page doesn't exist. I want to able to search for this URL and find on which page(s) it ...
0
votes
1answer
30 views

Why should we use the name attribute with the value “s” in the creation of the search form?

I was doing a search form when I realized that if I change the value of the name attribute to something other than "s", the search.php page will not be displayed. How can I change and still display ...
0
votes
0answers
29 views

How to create a custom filter in Wordpress?

I am creating a e learning site where i want provide my visitors a functionality to get the results which they need . Suppose a visitor needs to find the colleges in a particular location. So I ...
0
votes
0answers
17 views

How can i make this type of custom search in my wordpress website

I want to add a custom search on my homepage, how can I do this type of search engine in my homepage.
0
votes
0answers
36 views

Wordpress search post using unicode

I'm working with wordpress rest api I need to searching WP posts with unicode character example searching on my site: https://example.net/?s=ngoại+tình The results is OK The I applied to my api : ...
0
votes
0answers
43 views

Extend product search with meta in WooCommerce

I would improve the search bar in order to exploit manufacture attribute linked to product. I try to use this to filter product by a custom meta (no product attribute) function custom_search_query( $...
0
votes
0answers
17 views

How to block certain keywords from searching and redirect to different page on Wordpress?

I would like to block certain keywords (multiple keywords, banned keywords like fuk, sit etc.) from searching on Wordpress blog and show/redirect visitor/member (searcher) to different page. Used ...
2
votes
0answers
32 views

Extend 'The Events Calendar' search to include custom fields [closed]

I am using the following code to modify the default WordPress search and The Events Calendar search to include custom fields. The custom fields are added by the Advanced Custom Field (ACF) plugin (...
0
votes
0answers
21 views

How to debug none working search query?

I'm developing an website that I didn't built the foundation for. When I try to implement a simple search query I just get nothing in response. There is no errors showing up in normal php error ...
0
votes
1answer
44 views

Modifying post content with the_post action hook

I'm trying to understand the best way to modify the way that search results are displayed with my custom post type. I've got the search function working properly and giving the correct results and now ...
1
vote
0answers
9 views

How to search Woo Commerce products with punctuation in title?

How do I modify the default WooCommerce Product search so that products with punctuation in the title can be found without including the punctuation in the query? For example, if I have a product ...
0
votes
0answers
13 views

Add category to curent category filter - link

I want to place a link to a category (cat2) on the page MySite.com/category/cat1/ that takes you to MySite.com/category/cat1+cat2/ But if you already are on MySite.com/category/cat3+cat1/ I want it ...
0
votes
2answers
24 views

Adding id and class to the search input in WordPress search form

I want to apply the AJAX feature to the WordPress custom theme for search. And I need to target the input using id and class. I didn't find any tutorial on adding id to the premade WordPress search ...
0
votes
1answer
13 views

search results in custom template search.php

right now i have a problem in the search result page (search.php) the result is shown by the index page template not its template and it display all the posts despite it have what the searcher enter ...
1
vote
1answer
170 views

hook to get (and change) the search string before processing

I'm trying to intercept the search query before it's executed in Wordpress. I've tried a bunch of things but it's just not working. So, for example, a user enters the search term RED SHOES. I want ...
0
votes
1answer
32 views

Search returns “Nothing Found” on a sub directory

I've created a multisite using subdirectories. The search function, both in backend and frontend, only works on the main site. If I try and do a search in a subdirectory it returns with "Nothing Found"...
0
votes
0answers
130 views

Woocommerce Custom Search based on category not showing

Here i am explaining perfectly. I have created a custom search with category in woocommerce. It was working fine but has an issue. I am having a product which has two category. 1. Women 2. Accessory. ...
0
votes
1answer
35 views

getting posts by tags

i use below code for getting posts by word tag $search_songs = array( 'posts_per_page' => -1, 'post_type' => 'songs', 'tax_query' => array ( array ( ...
0
votes
2answers
18 views

How do you determine if a result in a search query is a post or a page?

I thought this question would be an easy find on the internet… however, it seems no one has ever ran into this issue before. There's no problem in listing a search query when you enter your search ...
0
votes
0answers
35 views

Return any exact match first, then all other search results

I'm trying to modify my search.php page to return any page/post that matches the search terms exactly, followed by all other results that a standard search would return. I'm currently using the ...
0
votes
1answer
19 views

Remove gray header on Search Result page on Wordpress

I'm new here, and new using Wordpress I'm creating a website, https://www.maispersona.com and I'm trying to modify my search page layout. (You can get into the website and search something to see) I'...