Questions tagged [search]

The method by which users find information on your WordPress site

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

Limiting Wordpress Search function : Custom build

The website I am busy working on was built by another company that no longer supports Wordpress so I am looking for help. Below is the PHP for the search function. From the research Ive done it seems ...
0
votes
0answers
14 views

How can I add categories on a search in Woocommerce? [on hold]

Let's imagine we are a store that sells clothes. We have different categories, as "Shirts", "Pants" and "Shoes". All of this products are stored with the name "Shirt XYZ Grey", "Red ABC Pant", etc., ...
0
votes
0answers
9 views

searchcount in Twig?

I"m tryign to get the search count: example: X result are found for 'keyword' I don't know much about Twig and Im struggling; below is my search result page, which display the search result ...
-1
votes
0answers
11 views

Can we use WC_Products_Query to get products that matches a desired product name? [on hold]

I have a requirement such that: User searches for a product Any product name that has a match for at least one word of the search string must be returned It must be in the descending order, with the ...
0
votes
1answer
10 views

Search with filters

I want to create Three Filters in the search form with three different filters as (Tags, categories and posts). Is it possible to create those filters? If possible means how can I create that? ...
1
vote
1answer
26 views

Where does the Yoast SEO plugin set the Open Graph metadata?

The Yoast SEO plugin add this line to the head section of the page: <meta property="og:image" content="https://link.to.image.jpg" /> But according to FB OpenGraph og:image not pulling images (...
0
votes
0answers
6 views

generate google map based on the user input in search bar [closed]

Hello!, so what I am trying to do is integrate google maps api in my website in a way that when a user enters a location and presses a button a map is shown on the next page with the entered location ...
0
votes
0answers
10 views

Site search gets me to posts page

I've built a web shop, on my 404 page I've a search bar, if you search there for a products it redirects me to a page with all the posts, but i want it to redirect me to the product search page, or ...
1
vote
1answer
39 views

search filter add priority to post_type and add order to some post_type

I don't want to change the core SEARCH function. I have default search function and only updating search.php file in the theme. I added search_filter function into functions.php. function ...
0
votes
0answers
8 views

Woocommerce Search - to only search custom pages listing products?

I have made custom pages that lists different woocommerce category products. These pages have a few categories in them and lists the products in them via WP Quesry. I want the search results to list ...
1
vote
1answer
22 views

Non-Blog Website without Search: are comments.php and search.php in theme still required?

What is the best practice when it comes to a static, minimal WP website? It will have no blog updates, no discussion/comments, and no search. Should all the standard template files still be included?
0
votes
0answers
22 views

How can I do a search by title and content in separate fields

this is my query, It works well. $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'cat'=> $category, 'date_query' => ...
0
votes
1answer
26 views

Query first and last name from custom post type

I want to query first and last name using custom post type metaboxes. Code i am using: $name = 'John Doe'; $args = array( 'post_type' => 'customers', 'post_status' => array( '...
1
vote
1answer
18 views

How to restrict wordpress search to pages and disable products listing search?

I have a requirement where i need to restrict wordpress search to pages listing only and disable products listing . In other words i wanted to replace post type in the search url from 'products' to '...
1
vote
0answers
14 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 ...
0
votes
0answers
18 views

Add ACF Fields to WordPress Search

Is there a way to alter the search.php file so it allows people to search based on an image title, caption, alt text or description, and receive the related result (image) from the ACF Gallery? ...
0
votes
0answers
12 views

Search.php customization (add button ) not working

I am trying to add "Special order" button in search.php before footer section. purpose of this button is if customer not found his desired product he can click on that button and will go to special ...
0
votes
0answers
27 views

WP_Query order by amount of matching meta keys

I'm trying to add functionality to a search function working around WP_Query, at the moment everything is working just as intended all I need now is to have the outputted results get order according ...
0
votes
0answers
42 views

How to extend WP_query to a specific table?

I created a new table (named extrapage) in the wordpress database (named wpsite_db). I have added to this table some pages not published directly with wordpress and I want these pages to be considered ...
0
votes
0answers
18 views

CPT search NOT finding results from posts title

I have a search bar to search for CPT (properties) on a page and show results below it including on a map. The search works if searching by address but Its not working if I search by the post's name/...
0
votes
0answers
8 views

order search results when query altered with wildcards

this is specific case for "Devanagari" fonts/language. I have a small encyclopedia type website having 18000 records in "Marathi" (a local state language in India). Marathi uses Devanagari script. ...
0
votes
1answer
14 views

Generate Static Page to Show Search Results/Detail for API

I'm fairly new to WordPress, but well seasoned in PHP. I've looked around for other examples, and most of the code samples I see are all about creating posts and hooking around the search results ...
0
votes
1answer
27 views

How to rewrite wordpress search to work on specific category

I want my wordpress search to work on specific category within custom search, by default this actually work fine example.com/categoryname/?s=keyword but I want to make it work like this example.com/...
0
votes
0answers
14 views

How to create a custom search form to filter data organized in tabs?

Considering that I have an Excel table that represents my "DB", I need to implement a custom search form that: retrieves data from the table, using some filters, and shows short results; opens a tab ...
1
vote
3answers
109 views

Wordpress Search - display taxonomy terms in results

I have a custom post type of Hotel. Hotels can be can be categorised with the taxonomy Resort. On my search page I need to be able to list hotels and taxonomy terms in the results, as separate ...
0
votes
0answers
9 views

restrict userlevel=“subscriber” content showing when item is searched

restrict userlevel="subscriber" content shows when you search a product regardless if the person is logged in or not. The restrict works when the product is viewed normally but shows up when using the ...
0
votes
0answers
10 views

Show all posts without pagination in menu editor selection panel

Which file do I need to modify to make the editor's item selection box display all posts without pagination? For color, this question derives from the fact that I need to manually build a complex ...
0
votes
0answers
13 views

Very large list of options for BuddyPress profile fields

I’m making a site with BuddyPress xprofile fields which can have up to 40000 options. I already loaded the options into the db via csv file. Now the site loads very slowly and is basically unusable. ...
0
votes
0answers
17 views

Search button click sends to single-custom_post_type instead staying at the same page

I created a template to display search results based on user selects. The problem is after I click on the search button it sends to the single-product(This is a Product custom post type). I also have ...
0
votes
1answer
20 views

Pagination Error : Duplicate argument being outputted

I've been writing a custom search.php loop for some time now and I'm running into a weird problem. My php argument is outputting some unexpected results by repeating the template file. Currently I ...
0
votes
1answer
21 views

searchform.php not included by get_search_form when using wp_dropdown_categories

I have a category dropdown within my searchform.php, coding within Wordpress 4.x. It has worked without issue for a couple of years. An issue has arisen with Wordpress 5.2. My searchform.php ...
0
votes
1answer
11 views

Editing a Search Form

I am working on a search form in my Wordpress site. It has an advance search box in which there is an Advance button, clicking which drops custom filters to include. https://ibb.co/R7DFC1F >> I want ...
0
votes
0answers
9 views

Search bar looks different in different pages

I have a website: cygnusi.com. The search bar in the Discussion page looks different from the search bar in the Projects and Members page. How do I fix this? PS yes, I use bbpress and buddypress
0
votes
1answer
42 views

Can't find a product by SKU

I have some problem with admin panel product search. The products in some categories can't be found by SKU, only by name, while the others can. I've tried to search with SKU:, but that didn't change ...
0
votes
0answers
9 views

Search box to filter large list of images

I have produced thousands of png images and organised them into two folders on my server as follows: 1901/ John.png Michael.png James.png Mary.png Jane.png 1911/ John.png Michael.png ...
0
votes
0answers
15 views

Special character Wordpress search problem

i am faced with the following problem when using Wordpress Search. If i create a post titled "Try Something", with body "Hello testing t&y thank you". If i now take a look in my db, i see that ...
0
votes
1answer
37 views

Remove pagination if search returns empty

I made a fix that when the searchbar is empty, it returns 'No results', instead of all posts, but the pagination still shows up. Does anyone know a fix for that? My code search.php: <div class="...
0
votes
1answer
48 views

Custom Post type doesn't appear in search results

I am working on a plugin where I am adding a custom post type and inserting its posts based on wp_insert_post function once the plugin is activated. The problem is that the custom post types cannot ...
0
votes
0answers
19 views

Modify wordpress search to search only pages and load matched page not search results

I am currently working on na project which requires a modification to wordpress search functionality. I would like to modify it in this manner to make wordpress search only page titles. to make ...
0
votes
0answers
28 views

Category of search results

Would it be possible customise the search results to add the category after each search result? Something like: Search result 1 Category A Search result 2 Category B Search result 3 Category A ...
0
votes
1answer
18 views

How to avoid bypass of search bar rules?

I’m building my site locally. Since I want users to be able to write only specific terms in the search bar, I put a jQuery script in the wp-content\themes\sitename\js folder. The script works fine, ...
0
votes
1answer
11 views

Restrict WordPress search to a single ACF field

I've used the following filter to include an ACF field into my search results. add_filter( 'pre_get_posts', 'so_9224493_adjust_search_query'); function so_9224493_adjust_search_query( $query ) { ...
0
votes
0answers
20 views

search results to show individual ACF fields from inside custom posts

In need of some help. I have my search results showing the custom post type with all the ACF fields inside. What I want is the search result to show the ACF singularly with a field name of file_name ...
0
votes
0answers
23 views

Numericals in my URL

My URL looks something like this: https://agencypedia.com/?llocs=jaipur&lcats%5B%5D=169&post_type=listing This is because of the latitude longitude thing in the theme. How do I fix the URL?
0
votes
0answers
34 views

WP_User_Query Search Multiple Keywords from a Multi-Select Field?

My code below works to list a single user when I ask to search for a single username; however, I am unable to list multiple users when asking to search for multiple usernames. Here is a brief ...
0
votes
1answer
31 views

Display the search results like the original pages

I'm creating my site (locally) and I'm using the starter theme underscores.me I created few pages using bold, italic, and other text styles, but I noticed that in the Search Results page, the content ...
0
votes
1answer
22 views

Search query with quotes

I'm trying to search through WP_Query in wordpress, in custom post types. I have this request $wp_query = Wp_Query(['post_type' => 'property', 's' => 'test']); This works perfect. but when my ...
0
votes
0answers
19 views

Post title value with colon causing search issues

Hoping someone can help shed some light here... I have the following titles: Icons & Innovators: Norman Lear Muslim/American: Halal 44 Charlton: Pride I am using the native WP search. The ...
0
votes
0answers
6 views

Looking to add a specific kind of custom post search

Recently my site changed themes. The old theme had a built-in staff directory plugin with a specialized search that had two features we now miss: It autocompleted staff member names. It allowed you ...
0
votes
0answers
27 views

pulling in external JSON search results into WordPress

I want to retrieve search results from a search appliance that gives results in JSON format. Interacting with the form below takes the user to a page of JSON data. Instead, I want to take the search....