Questions tagged [search]

The method by which users find information on your WordPress site

Filter by
Sorted by
Tagged with
0
votes
1answer
16 views

Disable Search Bar in Product Category Widget dropdown [closed]

My doubt is concerning the mobile experience for my website. I have two sections on my home page and many other pages on my website, one prompting customers to select a category and another to apply a ...
0
votes
0answers
16 views

Deactivate Search Bar

I am having problem deactivating the search bar in the header. It is not working properly. The problem is it is not a widget and it is not showing in the header section oh the theme. It came along ...
0
votes
0answers
15 views

Exclude certain search results based on role

I am currently working on a WordPress website and the website has multiple user roles. The website also has a documentation with multiple topics, but the visible topics depend on the user's role. I ...
0
votes
0answers
27 views

Rewrite Search URL Permalink For CPT Custom Taxonomies

My site uses a CPT with custom taxonomies and shows this URL for searches : https://example.com/?s=&post_type=listing&location=bridgeport&sale_type=for-sale&property_type=office But ...
0
votes
0answers
11 views

How to sanitize my GET string before using in post query

My question is about sanitizing user input data before using it. I am not very experienced in neither PHP or this sanitizing subject so I apologise in advance if this question might come across as ...
0
votes
0answers
23 views

how to include author in custom post type search

I have a search field where a user can type in something to search a custom post type. This works okay if the word exists in the title but not in the content. Also, I want to include authors in the ...
0
votes
0answers
10 views

Custom search results page template

My custom search form searches for posts in two custom post types by selected taxonomy. Search results are displayed on blogposts page (index.php template) and I need to display results on custom page....
0
votes
0answers
8 views

Showing Categories in Search Results (Wordpress)

I want to show the categories in the search results. How do I do this without plugins? Thanks My search.php <?php $s = get_search_query(); $args = array( 's' =>$s ); $...
0
votes
1answer
15 views

Limit Search to Product Pages only unless I'm on Blogpage or Blogposts

I'm using the following code to limit my search to products only (searching in the product archive). // Only show products in the front-end search results add_filter('pre_get_posts','...
0
votes
0answers
15 views

I need to disable 'woocommerce_hide_out_of_stock_items' when is_admin()

I have woocommerce_hide_out_of_stock_items option enabled, which works well. However, I am using SearchWP engine and I have enabled admin searches for this engine as well. When I search for some ...
0
votes
0answers
10 views

Getting list of categories that have posts in search results

Looking for a solution for the following problem. I am trying to create a list of categories that contain posts in a results page. Ideally this would also contain a post count. Up to this point I ...
0
votes
0answers
7 views

Override search results sort order conditionally [closed]

I'm new to WordPress Development. I have a client I'm working with that uses a third-party plugin to curate search results (ElasticPress), however, they are looking for additional buttons on the ...
0
votes
0answers
9 views

Add post meta to the search without plugins

Any way to add any post_meta to the search, without the use of plugins? I try to not add plugins just for one thing. So I'd like to do it without plugins. Is there a way to do so?
0
votes
0answers
12 views

Prioritize search result to show matching exact result [closed]

Suppose I search "TA" on wordpress query, the results show the posts with words containing "TA" first, like sTAnd, I want to display exact word "TA" first then words ...
0
votes
0answers
13 views

Limiting search to html heading tags

Is there a way to limit the Wordpress search function to only search among headings (as in <h1> to <h6>)? Or, ideally, to search among headings and post titles? I basically want to exclude ...
0
votes
1answer
16 views

Search WordPress using static html page

So I have a .html page under my Wordpress website and I want to be able to use the search button on the static html page to search the search.php page, is that possible? Is this correct? This is ...
0
votes
0answers
8 views

How to add search to custom taxonomy boxes in non-gutenberg editor

I am using the latest version of WordPress (5.7) and have created a custom post type with custom taxonomies. I do not have the Gutenberg editor activated for the post type, so I do not have search for ...
0
votes
0answers
25 views

meta_query not behaving well with spaces

I have created a custom search page where i can search in a Custom Post Type (Products) based on a number of custom fields that each product post has. This is the search input: <form role="...
0
votes
0answers
14 views

How to Ignore Specific/Common Words in Wordpress Search Query?

I am facing a strange problem with the search engine of my WordPress website. I want to turn off the case sensitivity of my WordPress search engine. For example if a user search "apple of one's ...
0
votes
0answers
8 views

Using a search string in the URL for Wordpress when upgrading to PHP 7

I am managing a fairly old Wordpress Theme for a local art gallery. The theme has been heavily customised based on the clients requirments. Most of the content is delivered usng a search string in the ...
0
votes
0answers
18 views

Customising the default wordpress search functionality

I find the current from WordPress too strict as it doesn't allow for some minor spelling mistakes. How can I edit this function? I was checking out pre-get-posts however I don't think that allows me ...
1
vote
0answers
15 views

Editing the default wordpress search

My wordpress sites search function is not relaxed enough for my liking. I want it to match more items and be less strict. How would i do this? I was thinking it would to do a pre-get posts filter but ...
2
votes
0answers
24 views

Custom Post Type not appearing in website search

I've built a custom theme from scratch for a client and have a few custom post types. For one in particular, FAQ, I wanted to hide it from showing individual posts (posts would only appear on its ...
0
votes
0answers
14 views

How to search in a category I want

I want to search in the categories I have selected.For example, I will create a special page to search for specific categories in that page.
1
vote
0answers
16 views

WordPress API for search

I have a search form for users on my website. I have a custom field called 'location' which is a country dropdown. If I type in a user's name and select a country from the dropdown I see this in the ...
0
votes
1answer
19 views

Custom search Dashboard widget

I have a custom dashboard that searches based on meta value. It works ok except that I now need to restrict the results/search to a specific post type, shop-subscription. This is the query I have, ...
0
votes
1answer
48 views

Is there An Input Checkbox Option That Works like `wp_dropdown_categories()` To Use In A WP Search Form?

I have custom post type that is currently using the wp_dropdown_categories() function within a WP search form so people will be able to filter by salary band and job type. Is there an equivalent ...
0
votes
0answers
19 views

REST API: Search products only in the names

I'm using the WooCommerce REST API to search products by string. Quick question: Is it possible to limit the REST API query ?search= to products names ? Currently it also searches the string in the ...
0
votes
1answer
20 views

Changing default wp search string

By default WordPress use a + between spaces whenever we search for something on a blog which is built on WordPress. Is there any way to change that + into a hyphen.
-1
votes
1answer
19 views

Limit search to posts and pages

I'm adding a search bar to my website, but I want the search bar to only to grab the posts and pages, every time I ask to go to a certain page it makes up a page as an index.php was just wondering if ...
0
votes
1answer
22 views

Search results: How to add direct jump to anchor?

I would like to add "Jump to section" links directly to the WordPress search results. Example: Say I have long product page with description of several products. Say the page "Products&...
0
votes
0answers
23 views

Exclude image title from site search results

A user pointed this out to me recently and I've been scratching my head trying to figure it out. Currently the standard wordpress search box on my site is returning images in my media library in the ...
0
votes
1answer
84 views

Use an HTML <select> Element To Filter Taxonomies In WP Search

I have a WP search form where I would like to add a <select> element for a particular taxonomy and its terms (salary bands) for a custom post type of 'jobs'. The current standard input search ...
0
votes
0answers
17 views

Search custom taxonomy via query-string?

I would like to expand Wordpress / WooCommerce search to allow for formulating a query-string that includes custom taxonomies. The default query-string only takes the variable ?s= followed by a search ...
0
votes
0answers
16 views

How to serve a searchable database of more than a million records

I have a database that is current living in a CSV file in my local machine. That database contains around one million entries. An entry looks like the following: NAME SURNAME PLACE_OF_BIRTH ...
0
votes
1answer
21 views

Only show meta on one post type on search results page

I want to remove the post meta from all post types that are not "posts" from my site or at least from the search results. Im currently using the Jnews theme and in the search results page I ...
0
votes
0answers
8 views

How to add a location category to a search bar

I'm creating a directory site and I'm trying to customize the main search bar and I can't really find any help... does anyone know how I could do this?
0
votes
0answers
12 views

How to show posts in grid style on search result page?

I want to show posts in a grid-style layout on the search result page when someone searches for something using the search bar. Right now it is showing a list-style layout. I also want to hide the &...
0
votes
1answer
9 views

How to hide an option from dropdown in filter module

I'm using LearnPress LMS plugin and it doesn't offer an option to hide filter taxonomies. I want to hide the "most members" from dropdown filter. I've tried searching the term in plugin ...
0
votes
0answers
11 views

Custom search for whole site to include a single meta key apart from post content and title

I have a plugin, in which i need to override the wp search, so that it includes the meta key '_tl_key' value in the search. Suppose i have a page with the meta key value "hello this is me",...
0
votes
0answers
13 views

WP search box on page not finding .PDF files

Current marketing person left the business and I'm filling the role for now. Receiving code from search page which formally was able to locate .PDF files by typing in and searching by key word(s.) The ...
0
votes
1answer
16 views

Bots using internal wordpress search

My stats show that a lot of bots are abusing the internal wordpress search functionality of my site: www.yinlingjiaoyu.cn 9 www.scckym.cn 9 www.gzcq1688.cn 9 www.mindswift.cn 8 www.ytgso.cn 8 www....
0
votes
1answer
31 views

find custom post type post by searching its custom field with my string

I have a custom post type called series and each post has a custom field named originaltitle. So in my code before I create a new post, I need to check if there is already a "series" with ...
0
votes
1answer
20 views

Add rewrite rule for archive search

I want to searchable archives like following: Default Search: /search/{keyword} -> search.php -> get_template_part('archive-default-search'); Default Custom Archive: /support -> archive-...
1
vote
0answers
27 views

Redirect template based on permalink rather than $wp_query

I'm trying to separate out different templates which utilise WordPress' search (s query var) along with different post types. Situation 1: Default WordPress search page (search.php). Example: example....
1
vote
1answer
21 views

Wordpress, fetching users with an exact match in a string of comma separated values in user_meta

I have data saved in user_meta -> areapref field. It is basically a string of comma delimited post IDs (e.g. 2, 37, 200, 300 etc.) I need to check if the user has a particular ID in this field. If ...
0
votes
1answer
16 views

Adding ELSE argument to AJAX Live Search for “No results found”

Having finally being able to make an AJAX driven live search functional, I need help understanding how to add an else argument function so that when there are no posts matching the search query, the ...
1
vote
0answers
18 views

How to use wp_query to post count by search term > group post count by date > convert to json. (ex. result 12-21-2020 - 343)

Im trying to create a graph that displays count of post per day and display it on the search result page. Search Example. User searches with the search term "football". The search result ...
0
votes
0answers
11 views

Add a functionality to quickly filter custom posts in Admin Area

I am creating a website for a doggie rescue, basically configuring the backend so they can manage dogs, volunteers, etc. The legacy system had a feature where the user could start typing into an input ...
3
votes
1answer
56 views

searching in custom meta field

I have multiples custom field in a post type. i can save data, update and display, all fine. now I'm doing the search engine. as it is a library, it must be possible to search in specific fields (...

1
2 3 4 5
35