Questions tagged [search]

The method by which users find information on your WordPress site

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

WordPress how to prevent URL encoding in URL of taxonomy terms

Is it possible to prevent WordPress from encoding URL with terms? I have a sample taxonomy term "iPhone5~iPhone7" and when I use it for the search function, it turns to "iphone5%ef%bd%...
user avatar
0 votes
1 answer
18 views

Post and page content not displaying in search results

I am using a content-search.php template part to output my search results. The post/page titles and links to those posts/pages are working correctly, but for some reason the the_content() function is ...
user avatar
0 votes
0 answers
12 views

How to have multiple search result pages in wordpress with taxonomy terms listed

I am using a custom theme which has custom post types. First one is Doctors another is Hospital. Both doctors and hospitals have a common taxonomy named specialities. Each speciality has some services ...
user avatar
0 votes
0 answers
13 views

Search Character Set Problem

I have a local WordPress setup in the Turkish language. I have a post title like ... MAMASI .... When I search by keyword maması in lower-case it doesn't find post. I try the table Character set ...
user avatar
  • 181
-1 votes
0 answers
14 views

how to limit search to post titles and contents by functions code?

Is there a way to limit search to post titles and contents? I tried below code in the link and its working but its just for titles. I would like to have function code for titles and contents. how to ...
user avatar
-2 votes
0 answers
12 views

limit search to post titles update the code for WordPress 5.9.3 [closed]

Hi Please update this code for WordPress 5.9.3 many thanks how to limit search to post titles?
user avatar
0 votes
1 answer
23 views

How to remove the message 'We could not find any results for your search' without changing template files and without adding posts/pages?

I take the question back with context. The goal is not to add posts or pages so that the post is replaced by the title of the post/page. The goal is not to modify the search.php file to remove this ...
user avatar
0 votes
0 answers
12 views

Type character in name and make it invisble

my website is using MyHome theme. I need to write identical names for two search fields. Here - https://komand.suvenirite.net/dava-pod-naem/?offer-type=rent And here- https://komand.suvenirite.net/...
user avatar
  • 1
0 votes
1 answer
19 views

How to set "split_on_numerics" to false in ElasticSearch mapping using ElasticPress? (for proper SKU search in WooCommerce) [closed]

I've been using ElasticSearch v7.10 installed on the same server that I have a website in WordPress with WooCommerce, that is connected using the plugin ElasticPress v4.0. I am trying to modify ...
user avatar
  • 33
0 votes
0 answers
19 views

How to create a search form with multiple search fields

I have a client that would like to add a search facility to their site but... They would like to allow the user to search various different custom fields. Here's an example of the sort of thing I'm ...
user avatar
0 votes
1 answer
19 views

Wordpress search WP_Query to cover multiple post types and their custom fields?

I am trying to make the WP default search a bit more intelligent, by having it use custom fields. It searches through my custom post types, but only for the usual fields (excerpt, title, content). In ...
user avatar
0 votes
0 answers
27 views

Best approach to make all tags searchable by the wordpress search function

I have over 2000 tags on one of my sites and I like them to be searchable by the wordpress search function. The problem is if I use a plugin, the time it takes to search them all is enormous. I think ...
user avatar
  • 299
0 votes
0 answers
17 views

Display WordPress search results based on the selected Sub-Category

I'm trying to create a search using dropdowns in WordPress. I've got two dropdowns, 1 - Parent Category and 1 - Sub-category. The Sub-category will show automatically based on the selected Parent ...
user avatar
  • 11
0 votes
0 answers
12 views

How do I set the Stewart Search Template to return only published posts in the result

I recently took a WP.com online webinar and the moderator referred me here to ask my question. I am trying to redesign my site using FSE. I am using the "Stewart" theme. I have added a ...
user avatar
  • 1
0 votes
0 answers
13 views

Woocommerce AJAX filters option loading spiner - problem on mobile device

I've got quite weird problem. I built product filtering options, sometimes the server is slower so I wanted to add a loading spinner while you wait for the results. I only managed 50% because it works ...
user avatar
0 votes
0 answers
10 views

Changing the wordpress default search url to something like - ...example.com/search?query=keyword

So I was trying to customize the WordPress default search URL and I found several solutions describing how to add a custom slug to the WordPress search URL and turn them into something like ...example....
user avatar
  • 101
0 votes
1 answer
22 views

search custom table in wp database with searchform

I need a search template for my custom table in my wordpress. It should be one searchform and this searchform should search all entries using the "LIKE" option. The table in my wordpress db ...
user avatar
0 votes
0 answers
9 views

WordPress: Highlight search result exact matches

found this neat code to highlight search terms. My problem with the code is that it does not prioritize exact matches and it highlights words within other words. So searching for "in my hometown&...
user avatar
0 votes
0 answers
10 views

Product custom taxonomy is not found when space in name

I have created a custom taxonomy and added the below script for the search in the function.php. This works so far. But if the name of the taxonomy has a space, it will not be found. So if the title of ...
user avatar
0 votes
0 answers
16 views

I want to add another search box on posts page in dashboard

There is already a search box in wordpress dashboard for posts, products, pages etc. in their listing page. My client use wordpress admin with their phone so he requested another search box on top of ...
user avatar
0 votes
0 answers
15 views

Change searching from world level to first letter

Iwant to change the search filter from word level to first letter in terms when creating custom post. How can change it ?
user avatar
0 votes
0 answers
10 views

How can I stop redirecting from a search to a taxonomy archive page

I have a search form that searches through custom taxonomies, but instead of printing the results on the search page it redirects to the taxonomy archive. I leave the url before and after the redirect ...
user avatar
0 votes
0 answers
14 views

WordPress CPT Taxonomy Dashboard Search - How to include taxonomy in search?

I am having great difficulty extending my Custom Post Type (CPT) with custom taxonomies to have taxomonies that are searchable when viewing the posts in the WordPress Dashboard. The CPT's and ...
user avatar
1 vote
0 answers
18 views

Wordpress search only showing a few posts

I am working on a Website and am linking category links to the search page. Now the search behaves seemingly random as seen here: https://hasel.dev/?s=dizh The search for the post returns the post, so ...
user avatar
0 votes
0 answers
17 views

How to search post titles with whole words only, but not the exact word only?

I'm using WP Custom Fields Search plugin for my search but am searching the core post title field. The default search is including results where the word is part of another word. For example, ...
user avatar
  • 1
0 votes
1 answer
130 views

WordPress Search Ajax + Isotope + InfiniteScroll

Custom Ajax Search filter for WordPress Search I want to give a complete breakdown so you can easily analyse the problem and see that the issue is nowhere else, but the JavaScript. If you are not new ...
user avatar
0 votes
1 answer
18 views

My combination of 'post_type' and 'tax_query' not working?

I want to filter search results by custom post type and custom taxonomy terms, the result is here: add_action('pre_get_posts','search_filter'); function search_filter($query) { if($query->...
user avatar
  • 165
0 votes
0 answers
18 views

Search anything from a Child and Sub-Pages of their Parent page

I am trying to search and want to get results only from the Child - Sub Pages of their parent page. In the following code, I just get results from child pages, not subpages. Please help Understand the ...
user avatar
0 votes
0 answers
9 views

Media Library / Backend: How can I search for text in the ALT Text field?

By default, a search in the media library of WordPress 5.9 finds only media items which contain the search string in the following fields: Title Caption Description In other words, it does NOT ...
user avatar
0 votes
0 answers
17 views

how can i include post meta in search result

I have made this code to search for post but i want to include search also show post that have this meta '_wp_manga_alternative ' the code i made if($_GET['s'] && !empty($_GET['s'])) { $text = ...
user avatar
0 votes
0 answers
7 views

Extend product search to search in attributes

I try to extend the default Wordpress search query, which searches in post title, excerpt and content, to also search in product attributes. I tried to write the below code but it doesn't seem to work....
user avatar
  • 101
0 votes
1 answer
43 views

how to get this tax_query working?

I have wp_query including custom taxonomy terms which works if all the fields have values. Otherwise, it is giving 0 results. This is the form that is used to get the taxonomy terms. Based on the ...
user avatar
0 votes
0 answers
20 views

Highlighting Text in Search Results

I was wondering if there was some way to highlight text in bold when you're searching for words. For example. Currently, my new website shows the extract but the first few words as well as Table of ...
user avatar
  • 1
0 votes
1 answer
20 views

How to prevent WP_Query from filtering on 's' but keep 's' for other purposes?

I am trying to use the pre_get_posts hook to replace WordPress's search function with my own, so I want to unset $query->query_vars['s'] so that it does not restrict the results, but I want to keep ...
user avatar
  • 119
0 votes
1 answer
93 views

Select2 AJAX and WP Query Returns ALL and does not filter

So I'm a bit stumped here. I regularly use Select2/AJAX/WP_Query to search for and retrieve default WP post-types and my own custom post-types. Almost every site I've built over the past few years ...
user avatar
  • 1,858
0 votes
1 answer
43 views

WordPress Default Category and Custom Taxonomy Selected Attribute not Working After Searched in wp_dropdown_categories Array

I have Three Fields in the form, first is Default WordPress Category and two custom taxonomies. When I try to Search a Single field "Selected Attribute" Works Correct but on category, ...
user avatar
1 vote
2 answers
97 views

Searching custom fields is removing search on the post_title column

I have the following custom search active in our WP admin for only administrators add_action('pre_get_posts', 'query_custom_admin_search', 21 ); function query_custom_admin_search( $wp_query ) { ...
user avatar
  • 288
0 votes
0 answers
15 views

My worpress search page is showing no results

I want to display the publications searched for via searchform.php in the search.php page but it does not work ... The search is done well when I look at the url (ex: New World): http://localhost/?...
user avatar
0 votes
0 answers
21 views

Automatically adding tags and categories into Post Excerpt for searching

I have created a complete user front end posting system. Users post content that only they can view from a front end posting system. They can add tags and set a category. In order to be able to run a ...
user avatar
0 votes
0 answers
9 views

RSS feeds for specific topics

on a word press site i am trying to build, i am trying to get a listing of current news feeds from reliable sourced on a specific topic. In the WordPress RSS options, is there a way to set up a feed, ...
user avatar
0 votes
0 answers
22 views

Replace a single variable with add_filter

I'm trying to hook to a function in class-wp-query.php and replace a single variable – $searchand = ' AND ' into $searchand = ' OR '. The trouble, I assume, is that it's only the third occurence of ...
user avatar
  • 312
0 votes
0 answers
12 views

Search in posts' attachments: title, caption, description

I have seen variations on this question here and some have pointed to this solution (which doesn't work and is apparently syntactically incorrect as well). I have also seen people ask about searching ...
user avatar
  • 133
0 votes
1 answer
37 views

Custom Taxonomy Search result page

I have a post type named Icons, I have a custom taxonomy named Icons Pack which have a custom field for featured image. Also I have a search form in my site for users to search for the icons they want ...
user avatar
0 votes
0 answers
23 views

Showing results from json-string in Wordpress search results page

We're using a service called "Pandosearch" which indexes your website and provides a json-string with results after a call to the service. Example call: When you search for "pandosearch&...
user avatar
  • 101
0 votes
0 answers
22 views

Is it possible to get the specific content on the search page?

I am working on the WordPress search. I am using the below code to get the data on the search page. $s=get_search_query(); $args = array( 's' =>$s ); $query = ...
user avatar
0 votes
0 answers
23 views

How to add the search page link to the anchor tag?

I have a search field and when the user enters anything in the field then it will display the page name in the dropdown. Now Once the user selects the page then I have to redirect to the search page ...
user avatar
-1 votes
2 answers
32 views

What is the 'selected' parameter in wp_dropdown_categories() for?

I'm studying someone else's code (a custom search widget based on Elementor) and there's one thing I just don't understand. $type_term = get_term_by('slug', get_query_var($taxonomy), $taxonomy); $type ...
user avatar
0 votes
0 answers
43 views

Block internal search queries with pre_get_posts and regex rules

This relates to my previous question: Internal search spam (UPD: I no longer use Ivory Search) The closest question I found: Block search keywords As I understood, I need to use pre_get_posts, but I ...
user avatar
  • 1
0 votes
0 answers
21 views

Rewrite the search page to use an appended slug + parameter

I have two URLs that handle search ~/search/ = main search page ~/?s= = results page What I want: to have one search page where the search parameter for the results page appends to the search page ...
user avatar
  • 101
0 votes
0 answers
21 views

Change search query in wordpress custom post type

I want to change the query of search a custom post type in wordpress admin panel. I use this method: function change_admin_search( $query ) { $post_type = 'custom_post_type'; if( ! is_admin()...
user avatar

1
2 3 4 5
36