Questions tagged [search]

The method by which users find information on your WordPress site

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

Search bar to filter PHPMyAdmin table

I made a table in the PHPMyAdmin that I have in my WordPress dashboard. Picture: I'm trying to make a search bar to sort the table by internship name: Picture: Here's my current code for the search ...
0
votes
1answer
9 views

Trying to get all links in my posts

I am trying to return all the links inside my posts'/pages' content, but I can't figure out how to get my regex/loop to work right. Here is what I have at the moment, that just returns a bunch of ...
1
vote
0answers
26 views

How can I use WP_Site_Query to find a blog by blog name?

WP_Site_Query accepts a search argument but if a search term or phrase is supplied, only the path and domain columns can be searched. The site_search_columns filter allows filtering of the columns to ...
0
votes
2answers
30 views

How to search order using database frontend short code WordPress

I do not have a lot of coding knowledge. How do I add a WordPress searching database shortcode to the frontend using the metavalue as if I were to search for "demo", the metavalue(named as ...
2
votes
1answer
25 views

How to do multiple searches (with logical OR) in WP_Query in hook pre_get_posts?

Example: $query->set('s', 'foo bar'); - search foo bar I want set search as foo bar OR lorem ipsum dolor OR ping pong
0
votes
0answers
14 views

Autocomplete search with ajax? No plugins [closed]

I'm looking for a guidance on how to make an autocomplete ajax search. Like this website has: https://www.bitochat.com/ Except without a plugin. Ive searched all over this forum, but couldn't find a ...
0
votes
0answers
29 views

Adding an HTML page to a wordpress website

I have a folder containing some images and an HTML file, and I'd like to find the easiest way to add this page to a Wordpress website. If I directly upload (via FTP) the folder on the website, how can ...
0
votes
1answer
29 views

Why isn't the 'no results' being shown when a query returns no results?

I've been following this tutorial for a simple AJAX filter search within wordpress: https://itsmereal.com/simple-ajax-filter-search-for-wordpress/?unapproved=3915&moderation-hash=...
0
votes
1answer
72 views

How to fetch Email addres of an author via ID?

I want to make an HTML form which will have an input field to fill in the ID of the user. Then I want to pass the value into a php code such that the email address associated with that user ID is ...
0
votes
1answer
22 views

Wordpress custom search form with pre_get_posts not work

I am designing my first theme and I am stuck on the search functionalities of a Custom Post Type. I created a CPT 'movies' and created the archive page with the 'archive-movies.php' file in the root ...
0
votes
1answer
25 views

How to order search results so a specific page appears first when user searches for a particular word?

I am trying to create a function that would give me a specific result order when the user inserts a specific word in the search bar. Example: The user inserts in the search bar "banana" and ...
0
votes
0answers
9 views

Taxonomy search

I've added custom taxonomy to my posts, and I was wondering if there's a way to create a search function where certain custom tanxonomies are displayed as a drop down, and then people can click on as ...
0
votes
1answer
20 views

Add dynamic search to paginated WP_Query

I am currently displaying a list of pages with "words" (English learning site) using WP_Query. I want to add a search field at the top of the list, but in a way that would dynamically (is it ...
0
votes
1answer
10 views

How to Fix “Duplicate Id Issue” Occuring Due to Main Menu/Mobile Menu [closed]

While doing AODA testing for the website i got this issue of "Duplicate id attribute value "menu-item- **" found on the web page." and this is due to conflict of Mobile menu id's ...
1
vote
0answers
35 views

How to make the WP query search for the “s” arg in other places too

By default, the WP query searches for the "s" arg in the post title, content and excerpt. How can I extend this and make it search in other places as well, such as author display name? ...
0
votes
0answers
20 views

WP-admin search in custom table

I need help on how I could customize the search functionality in WordPress admin area. I need search result from custom table in my database called "players". I use woocommerce membership ...
0
votes
0answers
15 views

Showing Posts if non are found

I'm trying to write my search.php that it shows the posts when searched for but when non post match the search, it just shows all posts again (like on the index). This is my code at the moment. It ...
0
votes
0answers
16 views

Apostrophe optional in search query

Presuming there is a post called "John's Article". I need the post to show up in search result both when I search for "john's" as well as when I search for "johns". How ...
0
votes
0answers
16 views

Search Exact on WordPress - Relevannsi Solution Not Working

I have read a lot of articles about exact keyword query problems in WordPress and how to fix them, even though I have followed them but still no success. My website is under construction about ...
0
votes
0answers
14 views

Auto-expandable search box and pre-loader progress bar in CSS

I am not very familiar with WordPress and CSS, however, I am trying to describe the scenario. my system info is mentioned below: php 8.0.7 WordPress 5.7.2 woocommerce 5.4.1 elementor pro 3.3.1 theme: ...
0
votes
0answers
41 views

Change ajax live search results

im using this code for my website ajax live search for post title The HTML (could be part of page content) <input type="text" name="keyword" id="keyword" onkeyup="...
0
votes
0answers
17 views

Why not works the search.php file?

I'm sorry, I speak a little English. All posts (example) in my custom theme index.php listing: Cam on Cam off Applications West side Many money I have a custom theme and custom search.php file. If I ...
0
votes
0answers
12 views

Text input field for filtering custom post type in custom archive page

I made a glossary custom archive for a custom post type 'words' and I'm trying to add a search bar/text input field that will filter the words and only show the ones that have the ...
0
votes
0answers
13 views

Search results page title when taxonomy chosen in filter

I have a search form which includes a filter for 'post type', 'sector', and 'region' plus a text field for searching whatever words a user wants. 'Sector' and 'region' are custom taxonomies. Currently ...
0
votes
2answers
38 views

Add a searchbox to the body of a page

I'm creating a website in which I need that, when I click on one of the tabs of the specific menu, and it opens, this page contains a search box in its body. My question is how can I add this search ...
0
votes
0answers
13 views

search form for custom fields

I want to create a custom search for pin code search with custom fields value. When exact match with pin code will show the post data Can you please help me? Any help in this matter would be ...
1
vote
1answer
40 views

meta_query search names when they have middle initials

I have to build a search form where I search members of the company by their Full Name (First Name + Middle Initial + Last Name). All the names are in this form: John B. Doe The below code is working ...
1
vote
0answers
12 views

How to set up a pay-per-search / pay-per-query site with memberships? [closed]

I want to set up a website where customers can pay for searching a database. The idea would be that there are different types of memberships with different numbers of allowed searches in the database. ...
1
vote
1answer
23 views

input data and output table [closed]

I need a solution to do this with WP. In admin: I need to input data into database (name, surname, certification, level, date of issue). In Frontend: client can use a specific search field to search ...
1
vote
0answers
12 views

Add Custom Search Box to WooCommerce [closed]

I am trying to implement a custom simple search box on woocommerce. It should not overwrite default search attribute. This search box will search for product SKU number and return result only if it ...
0
votes
0answers
76 views

Excluding posts from search results page with meta query not working

On my search results page I have two loops. First loop displays post by meta value and second loop is "regular" loop that display posts by search query: <section> <div class=&...
0
votes
0answers
24 views

Search for custom field input of a custom post type in ajax live search

I have a custom post type (gd_place generated through GeoDirectory) with a custom field (select_funding as part of the table wp_geodir_gd_place_detail) where a user can choose one out of several ...
0
votes
0answers
7 views

Include tags in ajax search

I have set up a simple ajax search in my theme more or less based on this Now I'd like to search through post tags and propose tags in the live search that fit the search of the user. I haven't really ...
1
vote
1answer
53 views

How to find exact match for search term in WP_Query? What is the additional string added in LIKE query in WP_Query?

While searching with the argument s it adds additional value before and after each Like query SELECT wp_7_posts.ID FROM wp_7_posts WHERE 1=1 AND (((wp_7_posts.post_title LIKE '{...
0
votes
1answer
31 views

Wordpress custom search only works from some pages

UPDATE: 06/07/21 - I managed to reach out to the Dev who found the answer, in case anyone else even has something similar. See answer in responses below. We had our site built by a contractor. That ...
0
votes
1answer
11 views

Changing search slug from + to - (hyphen)

I've been fiddling with this all day, where I'm trying to change my search function from website.com/s?this%20is%20an%20example to website.com/tag/this-is-an-example to no avail. I have this code in ...
0
votes
1answer
37 views

How to combine two get_users() array?

The $q1 and $q2 are working well individually. if (!empty($search_term)) { $q1 = get_users(array( 'fields' => 'all', 'role' => 'contact', 'search' =&...
0
votes
0answers
43 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
25 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
31 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
11 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
17 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
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
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
15 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
17 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
31 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
22 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 ...

1
2 3 4 5
35