Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The method by which users find information on your WordPress site

0
votes
1answer
14 views

How might I go about using the API to search for a user by email, but ensuring that it is an exact match?

I am using the API currently to search for a user by email and then getting the ID if the user and then executing a change to the account based on the ID. The only issue is, it seems that when I ...
0
votes
1answer
14 views

Custom Search form not working in localhost

This was the solution that i got from @Ray Gulick for having a custom search form for custom post type. This works fine in hosting service but fails in localhost as the form action is added as action=...
1
vote
0answers
14 views

WP Query Args - Title or Taxonomy Value

How do I query by tax_value or title? I have $args = array( '_meta_or_title' => sanitize_text_field(preg_replace('/%20/', '+', $query[1])), 'posts_per_page' => 100, 'post_type' =&...
1
vote
1answer
24 views

How to search CPT's by meta query from the admin dashboard?

I feel like I'm missing something really obvious, but I've looked and can't figure this out. I have a CPT (request_form) and I need to perform searches on meta queries (wp_postmeta) rather than the ...
0
votes
0answers
5 views

Add to search posts query array with post IDS which will appear first

Is there a way to add array of post IDS to set posts to be on top of search results? Something like adding a param top_post_ids inside the search hool: $query->set( 'top_post_ids', [45, 78, 94 ] )...
0
votes
0answers
15 views

Wordpress Search across media files

How can i extend the wordpress default front-end Search to search across audio file titles/captions as well?
0
votes
0answers
5 views

Multisite Search by custom taxonomy

With multisite, each blog has its own table. I want to create a plugin that will add custom taxonomies to all blogs. I know how to do this. Then I want to create a query to return all posts for a ...
1
vote
1answer
33 views

How do i search post by jquery datepicker?

I'm working on the WordPress website I have my own search filter page, where I added the jquery datepicker, now I want to search post by datepicker? Html Code script> $(function() { jQuery( "#...
0
votes
0answers
14 views

How to search by title or tags exclusively?

I would like to modify the default search query of Wordpress to be able to get results from searching exclusively by tags or title. Meaning, it would show posts that contains a match from either the ...
0
votes
1answer
32 views

Wordpress search form and input type=“image”

I need help with this code. How can I get the search field to display when clicking on the search-icon.svg? <form role="search" method="get" class="search-form" action="<?php echo home_url( '/...
0
votes
0answers
16 views

Custom Post Type WP_Query with filters and search

I have a custom post type called "doctor", this is the query I have set for displaying all the posts in the archive template: $args = array( 'post_type' => 'doctor', 'orderby' =...
0
votes
0answers
19 views

is_search is returning false even though search.php exists

I have a problem even though search.php and searchform.php exist but when I search for words, nothing is displayed. I var_dump(is_search()) and it returns false. Anyone had this problem or help how to ...
0
votes
0answers
15 views

Search, pagination, the last pages leads to 404 page

sorry Im new to Wordpress. I have a search list and able to browse among hits: "http://example.com/search/SEARCHEDKEYWORD/page/11/" I have 15 pages, and the last 3 pages leads to 404 page. So, http://...
0
votes
1answer
18 views

Show total sales for each products on search results page Woocommerce

I customize my search results page like this when show the results as shown in the picture at the bottom I want to show total sales for each products on search results page
0
votes
1answer
22 views

Custom search for a custom post type in WordPress

I have created a custom search for a custom post type in WordPress that searches car vehicles. I can search by manufacturer and model but I want the search to be flexible and show results based on any ...
0
votes
0answers
13 views

Media search input in admin section gets auto filled by Chrome

When you go to Wordpress Media folder, Chrome Auto fills the Search form field, with the username from when the admin/shop manager logs in. How can i fix this? The problem came out of no where. ...
-1
votes
1answer
19 views

Want to creat a search for my wordpress theme [closed]

im new in wordpress , i've made my first theme and i need your help guys , i want to creat a search for my theme this is my search form : searchform.php <div class="search-home"> <form ...
1
vote
1answer
25 views

Redirect All Search Links Containing - to + on Wordpress

I deleted all my wordpress tags via phpmyadmin, and most of my post content contains tag links, now I redirected all the tag links to search using .htaccess, I.E example.com/tag/stack-exchange/ ...
0
votes
1answer
12 views

How can I change my search form to bring up product results, not blog results

I'm currently building a wordpress/woocommerce site using a template, and am having issues with the search form & results. When using the search bar, results come up with the title 'blog', and ...
0
votes
1answer
23 views

Trying to remove plural 's' from search Query but it's just removing every letter of the end - what am I doing wrong? Thanks

Trying to remove plural 's' from Woocommerce search Query but it's just removing every letter of the end - what am I doing wrong? Thanks function mySearchFilterFunction($query) { if ( !is_admin() &...
0
votes
1answer
14 views

Query posts that have all the specified tags

I have tried this one for example: $query = new WP_Query( array( 'tag__and' => array( 37, 47 ) ) ); It doesn't seem to work. Am I wrong in thinking that category and tags are the same relative to ...
-1
votes
0answers
26 views

Search custom post with custom fields by post author

I have a specific search requirement which searches custom posts with custom fields and returns post_authors as a result. Let’s say I have two custom post types house_post and car_post. A user can ...
0
votes
0answers
24 views

Notification for users based on saved search queries

I have been working on a saved search functionality and it's almost complete, I just need help with the very last part of the equation. I was able to run a wp_query which checks the found_posts of a ...
0
votes
1answer
21 views

the_excerpt displaying code inside style tag

I created a custom visual composer element where I included a style tag on it to use the chosen color to create hover effect. And this code is now displaying in the the_excerpt in the search result ...
1
vote
1answer
17 views

Combine multiple words in custom meta search query

I'm trying to create a custom search for my bookstore. I have two custom meta fields called vbs_author and vbs_publisher which hold the name of author and publisher of that product (book). So far ...
0
votes
0answers
14 views

Slow Query On Search

Please I have a very slow query on my wordpress search, checking the processes it takes upto 40sec to execute using SHOW FULL PROCESSLIST; below is a sample of query SELECT SQL_CALC_FOUND_ROWS ...
0
votes
1answer
16 views

Woocommerce wp-admin search products through custom meta value too

Right now I can search only through title and content. How can I search also through a custom meta box value?
1
vote
0answers
19 views

Use “search” in permalink?

I am currently in the process of migrating a custom web app to WordPress and in the custom app, search requests have a URL structure of mydomain.com/search?q={search criteria}. I attempted to add ...
0
votes
1answer
13 views

Search transients through widget

I have a certain amount of data stored in a transient through a custom developed plugin ( just for this one website ). The transient contains one big array of data that I get from an external API. The ...
3
votes
4answers
208 views

WordPress post sorting with AJAX

I am having a search result page for custom post type. I want to have a ajax sorting feature. Eg sort the post by taxonomy without reloading the page. A very basic example will help. Thanks The ...
0
votes
0answers
18 views

I need to sort the results of post wordpress search in order of category

I need to sort the results of post wordpress search in order of category. For example Post of category 1 Post of Category 2 Post of category 3 .......... I must be how ? I look forward to receiving ...
0
votes
0answers
16 views

Custom URLs in Wordpress Search Results

what i want to achieve is to change default wordpress url on search result page. by default when someone search url is something like this http://www.domain.com/?s=nokia i want this url to be changed ...
2
votes
1answer
90 views

Restrict a search to a custom post type

I have a search form in the home page and search form in the sidebar. Is it possible to make the search form in the home page show results as per a specific template and make the sidebar search form ...
0
votes
0answers
28 views

Custom search in Wordpress

So i have searched almost everywhere and tried at least a dozen different ways to accomplish a custom wp search. Hopefully i can verbalize what im trying to do well..here goes. I have a content page -...
0
votes
0answers
21 views

Why is there a 404 on page 2+ for my search page?

I've overridden the search.php template from within a plugin, and I've replaced the global $wp_query with a different one, and without any paging parameters it works fine. Once I add a /page/2/ on ...
1
vote
1answer
28 views

How do I have WP_Query match posts based on search parameter OR meta fields? (rather than search parameters AND meta fields)?

I'm trying to include post meta in the scope of a WordPress search using WP_Query. I have a meta query that looks like this: $args['meta_query'] = [ 'relation' => 'AND', [ 'key' =...
0
votes
1answer
16 views

how to create custom taxonomy drop downs for parents and child

Can someone help me please, i'm not good with php. i have created a custom post type called "used-car" and a custom taxnomy called "used-car-category" in functions.php Question: I need to create a ...
0
votes
0answers
8 views

Search with WP_Query, but ignore href URLs in anchor tags?

I've got a plugin which searches for related content using WP_Query. However, I'd like it to ignore words in the URLs of hyperlinks within articles. So for example, if I have this content on a page: ...
0
votes
1answer
45 views

Search filter by Post title OR Meta Title Value [duplicate]

I am trying to search Movies by it's Post title OR Meta Title value. But it is not working, it only search's by Meta value. I need to search by Post title as well and i.e check if the keyword is ...
1
vote
1answer
17 views

Multisite Installation: how do I setup global search?

I run a multisite installation and my sites are bilingual. I would like to find out how I can setup global search. Are there decent plugins available that do this? Cos I'm a wordpress noob and am ...
0
votes
1answer
44 views

Search results are showing full page instead of sample

My search results page is showing full pages instead of just part of a page and I can't figure out how to change it. I feel like I changed it TO show the full page but I can't remember how I did that ...
-2
votes
1answer
36 views

Searching Custom Posts content with JQuery

I am adapting the site's archive pages for CPT's to use a masonry layout and adding a live search to the archive page. I have a setup that is working. However I've just realized that my script will ...
0
votes
0answers
16 views

If search form empty remove query arg

now when i search i have link '?s=555&category=all' so search value is '555' when the search input is empty i must get link '?category=all' without search arg so without '?s='. I can do this with ...
0
votes
0answers
23 views

URL Parameters Saved In Search

Can someone help me to figure out how, after a user has saved a search on my site and wishes to get notified if anything new matching that search criteria has been added, can I then re-run the saved ...
-1
votes
1answer
54 views

Website Search Results Not Showing Images

anyone here knows why my search results are not showing images? here is my code: https://pastebin.com/sgCTnDcd
1
vote
0answers
22 views

Save Search System

I am trying to create a save search notification system whereby a user can search certain parameters on my site and save the search query like Ebay does or other classified ad websites do. I ...
2
votes
2answers
154 views

Search results don't show products

my website is a woocommerce site and it has blog posts and some pages. My problem is the search box. Everytime I searched it only shows the posts and pages results. It is not showing woocommerce ...
1
vote
0answers
47 views

Select posts by name and category per REST API

I have a site with a form, the form has 3 inputs. One takes a number, another a date, and another a select option. I made posts with categories from this select. How could I search on click of the ...
1
vote
0answers
19 views

Steps for custom data retrieval

I'm trying to create a data retrieval field within a page. This would be a single input text box, which would query a non-WordPress table and return the result. I have done custom retrieval in the ...
0
votes
1answer
47 views

multiple search forms and search results

I have 5 custom post types in my website and i need to make a search form for each one to show only results from it. What should be in the search form to only show results from the custom post type ...