Skip to main content

Questions tagged [search]

The method by which users find information on your WordPress site

682 questions with no upvoted or accepted answers
6 votes
2 answers
2k views

Admin Area Custom Type Search By Meta Fields Without Title & Content

I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code: ...
user1117841's user avatar
4 votes
1 answer
2k views

Exclude custom taxonomy from search results and archive pages

UPDATE: I have the following code working. It excludes the taxonomy from the search results. However, I would like this only to happen if a user is not logged in. The code below is taking effect for ...
McFarnell's user avatar
4 votes
1 answer
107 views

How do I get the total number of categories in a list of search results?

I want to display the total count of categories in a set of search results. For example, "10 posts found in 3 categories." (Assuming that each post has only 1 category.) Right now, my solution is to ...
Adam Pearlman's user avatar
4 votes
0 answers
505 views

Should I hint table index for search query on wp_post

I'm currently inspecting a WordPress setup with multiple custom post types that should be included into search results. The database query for a search after the word Search looks like this: SELECT ...
David's user avatar
  • 3,285
3 votes
1 answer
281 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 (...
Oox's user avatar
  • 53
3 votes
0 answers
2k views

Searchable meta value in user.php

I have created a new column in the user table list (admin page) and would like the column to be searchable in the search query, How do i add the meta to the search users query ? /** * Create user ...
Zoric's user avatar
  • 39
3 votes
1 answer
3k views

How to search only by post title and category?

I'm currently working on my first theme (based on underscores) and just realized the search does not return any results if I input a category name, nor does it give accurate results when searching ...
Carl Jue Nier's user avatar
3 votes
0 answers
139 views

Unable to create custom search results template page

I'm trying to create a search results page for our website and referring to the following documentation: https://codex.wordpress.org/Creating_a_Search_Page I created a new page template searchpage....
josef.van.niekerk's user avatar
2 votes
0 answers
42 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 ...
icykoala's user avatar
2 votes
0 answers
324 views

How to search media library alt text and title fields

I need to be able to search in the WordPress media library alt text and title fields. I've previously used a plugin called Media search Enhanced by 1fixdotio (https://wordpress.org/plugins/media-...
Andrew Abbott's user avatar
2 votes
0 answers
48 views

Automatically adding category filter based on search string

Like ebay and amazon, i want to implement something on my site wherby if someone searches e.g red dresses then the category "Women's dresses" is only searched within. As seen as below, a generic ...
Johnay_Coding's user avatar
2 votes
1 answer
3k views

Search not working with title and content

I am working on search. I am able to search post by tag and category but not able to search by title and content. I tried below code but it's not working. Would you help me out? $getSearch = ...
Naren Verma's user avatar
2 votes
0 answers
489 views

Make Wordpress Search for Both Main Domain and Subdomain

I have check through Stackexchange, but no topic is similar to this topic to this. Is there any way to make WordPress search work for both main site and subdomain? Both of them have two separate ...
XATA's user avatar
  • 67
2 votes
0 answers
76 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 ...
Collin's user avatar
  • 21
2 votes
0 answers
1k views

Search query - exact post title match

I have a bunch of posts titled something like this... English Language 2015 English Language 2016 English Language 2017 English Language 2018 And on each one of these posts I have a dropdown select ...
user144271's user avatar

15 30 50 per page
1
2 3 4 5
46