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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

The method by which users find information on your WordPress site

-1
votes
1answer
9 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 ...
-3
votes
0answers
26 views

Redirect If Search Query Contains Any Bad Word

I am looking for a WordPress php function for an Education website with following functionality: Redirect to a specific page - If user search for a query that contains any bad word from the given ...
0
votes
0answers
10 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
18 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
0answers
10 views

WordPress search through excel sheet of 10k tool names

I have a list of 10,000 tools in an excel sheet that I need to be able to search through in WordPress. The list of tools does not need to stay in excel, that’s just where it is right now. I need to ...
0
votes
0answers
17 views

Save Search Notification

I am in the middle of creating a save search system on my website and I have the save search side of things working, but the problem is that I now need to run the saved searches every few hours or ...
-1
votes
1answer
52 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
20 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
48 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
34 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
18 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
20 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 ...
0
votes
1answer
17 views

How many meta-query fields support WordPress search at a time?

I am new developer. I want know How many meta-query fields support WordPress search at a time? I saw that its getting (500 time out) errors after nine fields.
1
vote
1answer
28 views

Add custom field (value) to search result (without plugin)

I need to add custom field to wordpress search result. This what i tried to do is used pre_get_posts filter, like this: function search_filter( $query ) { $key_fields = array ( 'buty' ); $...
0
votes
1answer
30 views

how to add navigation icons in specific template?

I am developing a website for real estate and i stuck with a problem in my website. I want to add a page specific menu for page navigation with icon like 99acres.com and I am unable to understand ...
1
vote
0answers
28 views

Search and Filter

I am needing a search and filter option for a website. Please take a look at the example on this page, for the type of search and filter feature I am looking for: https://www.altec.com/inventory/ I ...
1
vote
1answer
12 views

Creating a Searchable PDF Archive of Publications

We are a not for profit association that produces a quarterly publication of about 45 pages. Want to create a members only archive of back issues in pdf format. This would be used for research (not a ...
1
vote
0answers
23 views

Display filtered results into custom page

I am trying to use the "Search and Filter" plugin to give a wp_query filters, but I don't want it to go to the search.php file. I want the results to be pulled up on the current page. I have searched ...
0
votes
0answers
19 views

Searching User Custom Field, suddenly not working. Only Searches raw SQL data?

I am facing a strange issue where suddenly custom user field search is not returning the values it use to, i have reverted everything back to a state where it use to work but still doesn't work so i ...
0
votes
1answer
10 views

Wordpress search page pagination displaying but not functional

I have a search page with pagination, that is displaying the correct number of pages, however it the links seem to be forwarding to the 404 page. $paged = ( get_query_var( 'paged' ) ) ? absint( ...
0
votes
1answer
17 views

Ideas how to search & replace post_content when string contains a newline?

I've previously been able to search & replace using the very helpful "Search & Replace" plugin for wordpress but now i've came across a problem i cannot solve. In table wp_posts i want to ...
0
votes
1answer
21 views

How to trim white space in search terms?

I'm seeing a weird problem where if someone searches "Test Search" it's returning fine, but if someone searches "Test Search " it's returning some weird posts that don't seem relevant. How do I go ...
1
vote
0answers
9 views

Extend & Search Native WordPress Image Galleries With Tags and Taxonomies?

How can I tag, taxonomize and search native media? I believe my obstacle is my failure to think "the WordPress way". Building my own plugin or theme code, I am looking to achieve the following ...
0
votes
0answers
18 views

i want to make a conditional search field between two Taxonomies

i want to make a conditional search field between two Taxonomies There has three Taxonomy: 1. Facilities 2. States 3. City Number 1 is ok but i want to make condition between number 2 and 3. For ...
0
votes
1answer
43 views

WordPress search and date filter not working with custom post type

I have a custom post type registered in my WordPress. Everything is working fine except Search and Filter functions are not working in admin. For example, I have posts from 2013 but when I select 2013 ...
1
vote
1answer
29 views

Query based on title, with 'compare' => 'IN'

I wanna do a query based on title with a predefiend variable. I cant seem to make it work. What am I missing? Making the query without the 'compare' isnt a problem. $args = array('post_type' =&...
0
votes
1answer
43 views

Search function not working

I am using SSHOP theme for my woocommerce store. when i search anything from home page search url works fine and following search permalink shows. https://techcart.pk/?s=abc but when i search when ...
1
vote
1answer
12 views

Set meta_query only for specific post type

I'm trying to hide my Woocommerce products that are out of stock from search, while still showing other post types in the results. The post type for the products are product. add_action( '...
0
votes
0answers
56 views

How to properly use paginate_links() on search results with multiple parameters

I build a custom search page based on results for a specific custom post type fileon my website. On the search page, where I list the results and the pagination using paginate_links()function, I ...
0
votes
0answers
44 views

Woocommerce Search by Filter Custom Fields

I create a taxonomy and custom fields search filter. <form role="search" action="<?php echo site_url('/'); ?>" method="get"> <input type="hidden" name="s" /> <select ...
0
votes
0answers
22 views

Woocommerce search loads 100% CPU, how to fix?

I have an e-shop running WP/Woocommerce. Any search query ruins CPU down. No search plugins, native search. Just about 300 products. AJAX search results loads fast and light, but if you add some ...
1
vote
1answer
20 views

Keep query string in url after executing a serch

Not sure if I titled it correctly but here is what I'm trying to do. What it's doing: User comes to my website with a campaign query string appended to the url like www.mywebsite.com?name=myName. I ...
0
votes
0answers
17 views

Code doesn't display some search results for custom search

I have custom posts: 1- Properties. 2- Projects. Then I attach properties to project using related posts addon for cmb2. Then I have custom search for projects contains that type of properties, the ...
0
votes
1answer
34 views

Wordpress Search matching hyphenated words

I've got a custom post type for comic books. The post type is called Comics (comics). I've implemented the WordPress search and I'm able to search the custom post type fine with the standard search ...
0
votes
1answer
21 views

How do i get The dropdown to have the value of the sub cat and custom fields

I Have the files searchform.php search.php adv-search.php that conect the dropdown categories and the code that show the dropdown is... enter code here$args = array( ...
0
votes
0answers
10 views

Ajax search results pagination

can anyone say me how to paginate this search result? This is my Jquery Ajax code: jQuery(function($){ $('#fld_551620_1').click(function(){ var country = document.getElementById("...
0
votes
0answers
13 views

How to make custom search look for results in fields other than title for custom post type?

I have created a custom search using JS on my website. It works fine but the only problem I have is that it doesn't look for results in any fields other than the title for custom post types. So if I ...
1
vote
2answers
47 views

search form redirects to home

Update Case closed. I forgot I have a kill function in my functions.php with redirects attachment, search, author, daily archive pages to home. Deleted the part for search and works fine. Sorry for ...
0
votes
0answers
18 views

Make WP search pickup results in pages that query their content from custom post types

I have a simple scenario that works well for organizational purposes, but that does not play well with stock wordpress search: I have content in a custom post type (say, a directory of people), and ...
0
votes
1answer
19 views

how to prevent the spam on search function?

I use a the plugin search meter to record users' searches on my website, but recently i got a lot of spam searches, is there any methods to prevent the spam? Screenshot as below: Thanks in advance!
2
votes
2answers
43 views

Searching through different categories on different pages code is not working

I am adding a default WordPress Search widget through Elementor on two of my page, page X and page Y. Page X ID = 100, page Y ID = 200. I want the user to be able to search through category 37 when he ...
0
votes
1answer
64 views

How to get value of a selected option from select tag and use it in WP_query to filter posts?

This is how I'm getting the value but how to use it in WP_Query so when I click Search to display let's say posts with Option 1 value? I'm doing this but don't know if meta_value is the answer $...
1
vote
2answers
38 views

Search function works improperly

So I am trying to edit my Search so it searches only for specific categories. I am adding this code to my functions.php file in child theme: function searchcategory($query) { if ($query->...
0
votes
1answer
16 views

How to create custom search page

So I'm trying to make my search.php file loop through three custom post types when doing a search. I currently have three cpts , post, anime, peliculas and I'm currently using a function that will ...
0
votes
1answer
18 views

Modify behaviour of “s” parameter in wp_query

I'm having an issue with the "s" parameter in wp_query. When someone search a text with two or more words, wp_query split the criteria in two or more parameters. For example : [no_found_rows] =>...
0
votes
0answers
18 views

Pulling in product attribute data when searching product by SKU

I am trying to create an eCommerce site that allows a user to search product by SKU. The products that I have in my store are variable products with attributes like: size, color, style, etc. I ...
0
votes
0answers
20 views

Search has query that will return no results

I working with an existing WP site that has a curious thing that is happening that I haven't been able to determine where the issue is? The large issue is that search always returns no results. I ...
0
votes
0answers
41 views

How to set custom fields ACF for Relevanssi plugin?

I have a Relevanssi plugin for searching results for my website, but i would like to choose only particular custom fields (plugin ACF) for searching. How can i do it? I know, that there is special ...
2
votes
0answers
78 views

Search query - exact post title match

I have a bunch of posts titled something like this... English Language 2015 English Language 2016 English Language 2017 English Language 2018 And on each one of these posts I have a dropdown select ...
0
votes
0answers
16 views

Search form - include key words and taxonomies

I'm having a custom search form on my Wordpress site. I would like my search form to search for posts by key words and! given taxonomies. So far I have this code: // SEARCH ALL TAXONOMIES, based on: ...