Questions tagged [search]

The method by which users find information on your WordPress site

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

WP_List_Table Inside Metabox Not Working on Clicking Search Button

I'm trying to display a WP_List_table inside a metabox. The metabox is for listing registered users to a course(LifterLMS Course Post Type). The table columns contain user_id, user_name, percentage &...
0
votes
1answer
16 views

Hide Search Form above results

I have a search form in the navbar. This works just fine, but when results are displayed, the search form is repeated above the results. I would like to keep the search form in the navbar, but lose ...
0
votes
1answer
28 views

Content disappears when searching with Search & Filter plugin

I manage a website in which the plugin Search & Filter is being used to go through the content by visitors. With a particular search query, the content appears correctly, soon to disappear ...
0
votes
1answer
14 views

Including taxonomy in searches

(Fairly new to WordPress, but I'm a React / NodeJS developer) I have a basic search function that search a custom post_type (listings). It makes use of the standard built in get_search_query and ...
0
votes
0answers
17 views

image only display in custom search

Please help me find a solution on displaying ONLY images in the search results. I’ve searched around and found nothing of such sort. I’m trying to develop an image content website similar to stock ...
1
vote
1answer
33 views

Setting custom search engine indexing for a “dynamic WordPress page” with htaccess

I am searching for hours but didnt found the code for my requirement, Can my requirement be done with htaccess? Requirement - These urls of a page should be indexed by Google: example.com/example-...
0
votes
1answer
95 views

Woocommerce: Search by custom attribute

I have created an attribute for products which is named: code. But default wordpress search functionality doesn't search code in front end. How I can modify it in order to include code in search ?
0
votes
0answers
15 views

Search in multiple categories using $query->set

Right now i have this code: function exclude_categorii( $query ) { if ( is_admin() || ! $query->is_main_query() ) return; if ( $query->is_tax ) { $query->set( 'category__in', ...
0
votes
0answers
14 views

custom search refreshing on submit and not giving results

The custom search refreshes on submit and also does not give any results. I am not sure what is wrong with the code but if someone could take a look at it to help me see what I am missing, I would ...
0
votes
1answer
18 views

Replacing word in wordpress Search not working Properly

I want to replace word/character in wordpress search using the below code, though it works but not well. E.G: if i search for only var it replaces var to foo and its works properly fine. but if i ...
1
vote
1answer
47 views

Advanced search by two criteria - sort by location and date (ascending or descending)

I have spent a couple of days working on this and I am still not able to figure it out. I am trying to make advanced search filter that sorts posts from a specific category on two criteria: location (...
0
votes
0answers
15 views

How change post_from with query filter?

Hi i m tring to ovveride a plugin query to database. I m succeded to change post_where in this way. remove_filter( 'posts_where', 'gmw_ps_pt_query_keywords', 20 ); add_filter( 'posts_where', '...
1
vote
2answers
22 views

How do I properly redirect outbound links with special characters

The search form on my website has a couple radio inputs for the user to select which source (all but one are external to the website) the search query should use. I retrieve those inputs (search ...
1
vote
0answers
25 views

Change WordPress search Permalink structure

Please I want to change my WordPress search permalink structure, from + as the separator to - Example: https://wordpress.stackexchange.com/search/please+help+me+out To https://wordpress....
1
vote
0answers
18 views

URL search link for 'category__and' instead of php query

I found this in the WP Docs: Display posts that are in multiple categories. This shows posts that are in both categories 2 and 6: $query = new WP_Query( array( 'category__and' => array( 2, 6 ) ) ); ...
0
votes
0answers
43 views

Replacing + sign to - in wp Search Permalink

I have really tried my best but nothing is working out, I want to replace my wp search permalink [spaces] and + to - Example: https://wordpress.stackexchange.com/search/i love you to https://...
0
votes
0answers
16 views

Modify main search form to search user too

I'm not sure if it's possible, i would like to modify the main search to allow search by user profile too... I only found solution for separate search.
0
votes
0answers
53 views

Post Type Search Gives Unexpected Results

I am working on a WordPress site that has several custom post types. Of course this lends itself to writing a custom search form. However, the results from test searches have been less than ...
0
votes
1answer
13 views

Allow WP users to sort search result on a videos site

So I have a video site based on wordpress - The search page currently shows post in date order but I want the users to have an option to sort the results by different options for example sort by views,...
1
vote
0answers
50 views

Wordpress default Search function inconsistent in WooCommerce Product Titles

I have a custom query searching by Post title keyword for WooCommerce. But some words return no results and some words do. This simple query doesn't return all words. Words that work: Dressing ...
0
votes
2answers
15 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
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 ...
0
votes
1answer
15 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
32 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
11 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
55 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
9 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
25 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
26 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
33 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
21 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
28 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
22 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
15 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
30 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
48 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
21 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
12 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
16 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
29 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 ...
2
votes
4answers
261 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
13 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
12 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
16 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
18 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
29 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
36 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
19 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
10 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