The Stack Overflow podcast is back! Listen to an interview with our new CEO.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2
votes
4answers
129 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
2answers
48 views

How to search from specific post type with tags?

UPDATED: I have a Custom Post Type Commercials. This post type has a title and a video id. I want to search from this specific post type. Right now it returns result which matches the titles only, I ...
0
votes
1answer
29 views

Live search by custom tag

Live search: $the_query = new WP_Query( array( 's' => esc_attr( $_POST['keyword'] ), 'post_type' => 'custom_type', 'sentence' => 'true' )); if( $the_query->have_posts() ) : while( $...
0
votes
1answer
33 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 ...
1
vote
0answers
18 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
1answer
35 views

Custom Search | check multiple meta_value for search value

I am going to split up my following question in two sections and make it more neutral, so people can look it up and find it if they have the same question, rather than making it too specific ... I am ...
1
vote
1answer
475 views

How to create an advanced filter search?

This is not really much of a technical question but it is more like an intro to the topic I want to talk about. So this is my first time creating an advanced search custom page in which I need to get ...
0
votes
2answers
468 views

Hide custom post type from search based on custom taxonomy

I'm looking to hide from search a few custom post type posts. I'm thinking that if I create a custom taxonomy for the custom post type with a term "hidden" then all posts checked will be hidden. Maybe ...
1
vote
1answer
669 views

Search by type posts and taxonomy

I want that my search page give results of posts (that i want that show) and taxonomy The code to get just two type of posts: function searchfilter($query) { if ($query->is_search &&...
0
votes
1answer
76 views

Clean Custom URL for Serach + Custom Taxonomy

I have a custom taxonomy, called filter. All of the following urls lead to the archive.php and should give me at least 1 post. /filter/bar works by default, no custom rule needed /myCategory/filter/...
0
votes
1answer
76 views

Advanced search redirecting to another page then filter further

I'm trying to do an advanced search that allows the user to select custom post taxonomies along with a typing field for another taxonomy. I've gotten it to go through to the page I want with the ...
0
votes
1answer
42 views

showing all search result in one template

When I do a simple search(just ?s in the query) it shows the result in the search.php template. but when I try to filter the result by custom taxonomies I created(for example ?s=text&brand=text) ...
1
vote
1answer
279 views

Querying on multiple taxonomies pulled from $_GET checkbox array not working?

I'll keep this super concise the normal search works perfectly, but when I've added some checkboxes for additional features, etc…the tax_query doesn't work however I know the $_GET is working as I've ...
3
votes
1answer
2k views

WordPress database error: [Not unique table/alias: 'wp_postmeta']

Someone very kindly helped me out on another question, which has now lead to this problem of two functions causing a database error. From what I've read it could have something to do with LEFT JOIN ...
2
votes
1answer
455 views

Building an Advanced Search (text, tags, category, custom fields) - Getting the wrong SQL query

I'm building an advanced search form, where I want to use the normal text field, tags,categories and also some custom fields. I created a form with all the values and i created a url parameters to ...
0
votes
2answers
4k views

CPT Search Form with Taxonomy filter & Or

I currently use the form below : <form role="search" method="get" class="search-form" action="<?php echo home_url( '/' ); ?>"> <input type="search" class="search-field" ...
0
votes
2answers
635 views

Search Query for Multiple Terms In Same Taxonomy

I have a search that works fine with custom fields, and one term per taxonomy. However I want to select multiple terms from one taxonomy "property-type". My current query looks like --- /?s=Search&...
1
vote
0answers
62 views

Pretty URL for custom search for custom post type

I am using custom post types, I made custom search form for this posts and also I need the default search to be working the search URL is http://example.com/?search=advanced&name=bla&cost=00&...
0
votes
1answer
454 views

Search only custom taxonomies

I created a custom taxonomy called people. In the meantime there are over 2k people available in this taxonomy. Now I want to make it possible to search for a person, e.g. I search for John, I want to ...
1
vote
0answers
253 views

Custom Taxonomy Not Working When added to WordPress Search

I have created custom taxonomies for a custom post type. I have added drop downs to the search form so I can add the custom taxonomies to the search criteria. The problem I am having is that when my ...
2
votes
1answer
1k views

tax_query shows no results if nothing is selected

I am creating a real estate website on WordPress, I am creating a custom search and am using tax_query to filter search results to display "States" & "Suburbs". The search works fine, when ...
0
votes
1answer
97 views

Custom Taxonomy, shows empty value (home page of website)

I have added records in wp_terms_taxonomy table and wants to show that record in the list item(dropdown like) exists in the form. As I have added two records in taxonomy table (taxonomy_name = ...
1
vote
1answer
970 views

Auto Complete Search

I have a post type name jobs and I created a few custom taxonomies named 'region', 'job_type' now I want to create a search that uses the custom taxonomies and jobs post types. I want the search to ...
0
votes
1answer
73 views

Ideas on how to organize a project [closed]

I know that questions that are mainly there to be discussed are not liked very much, but I still hope that you can think with me and give me some ideas. So thanks in advance to those of you, who are ...
2
votes
1answer
5k views

How to add custom taxonomy to search

So I have custom taxonomy called "cars". I would want that when user does search, it would also search through taxonomy. Meaning that in "cars" taxonomy if I have "Audi" term and user search with ...
2
votes
1answer
64 views

Taxonomy.php issue with search and filters

I'm trying to create a custom taxonomy.php page where my users can refine search into that context. I've tried to create a kind of loop like: <?php if(!empty($_GET['ending'])) ...
0
votes
2answers
192 views

WordPress custom taxonomies new/edit post autocomplete

I hope I can find some help or advice here regarding custom taxonomies auto-complete (maybe there is a ready-plugin but I am not aware of it). I have custom taxonomy which have around 500 items. So ...
1
vote
0answers
35 views

Search Tool only refreshes Page without showing results

I have a search tool that allows you to search plants based on multiple different taxonomies (Color, soil type, type, ect.) Each plant is set up as a post using ACF. You can search for plants based on ...
1
vote
0answers
142 views

Wordpress thinks my custom taxonomy pages are search pages #seo

I have set up a custom taxonomy for regular posts called guide. I have a template file called taxonomy-guide.php which lists out posts with a guide taxonomy. So my URL structure appears like this: ...
0
votes
1answer
45 views

Post not showing in my custom advanced search

I've created a custom-search-page for my theme that have to search in my CPT non-hierarchical taxonomy and eventually filter the results if some preference is inserted through the options form of ...
0
votes
2answers
828 views

How to restrict search on a certain page to only return results against custom taxonomies?

On a specific page, I would like the search to be performed only against the terms from two custom taxonomies. Not the content or title. That is, the user is directly searching taxonomy terms. What I'...
0
votes
1answer
658 views

Custom URLs in Custom Search Results

I need your help with Custom URLs in Custom Search Results (Wordpress). I have this URL http://domain.com/?s=&categories=489&locations=310 which get me search results. I can replace IDs with ...
0
votes
1answer
2k views

Wordpress autocomplete search with taxonomies

I'm trying to make a wordpress search that has autocomplete. The thing is I don't want to autocomplete the input with a post title but with categories. I explain my problem: I have a taxonomy called ...
3
votes
2answers
2k views

Exclude a term of a taxonomy with a custom post type in a search

I've got a WooCommerce category for sold items within WooCommerce's custom post type of 'product'. What I'm trying to do is have the site search only return results from the product post type but also ...
0
votes
1answer
585 views

Add “selected” class to custom taxonomy dropdown search

I found the following function to add a custom taxonomy dropdown to a search form. It works fine for searching, but it does not add the "selected" class to the searched-for term. Here is my code for ...
0
votes
1answer
260 views

Extensive search filtering and results->PDF in the front-end

Is it possible to implement the following, and if so, what is the best (or one of) the ways to do so: The setup: A custom post type 'listing' Custom taxonomies: 'artist', 'price', 'location', 'year',...
0
votes
0answers
271 views

Include attachments with a custom taxonomy in search

I need to include attachments in the search. So far, I have managed this by hooking into pre_get_posts and checking if it's on the search results page, I add 'attachment' to the post_type and 'inherit'...
0
votes
1answer
68 views

Geographic search with taxonomy structure [duplicate]

I had stored locations in wp with defined taxonomy. I would like implement a search that can take in consideration the location, eg, search for 'car rental, Maryland' All car rental are stored as ...
1
vote
2answers
924 views

Creating a custom search form

I am creating a custom search form which will search a custom post type called recipes. and it has a load of taxonomies. Now I output these taxonomy's terms into checkboxes which are grouped by the ...
0
votes
0answers
546 views

Wordpress WP_Query Array Custom search via taxonomies

I'm trying to write a custom search function for my WordPress site. I'm using WP_Query and multiple arraylists. Is it possible to order by search after taxonomy = pa_felg-bredde ? Here is my code ...
0
votes
1answer
1k views

Multi Parameter search with custom post type category and tag

i have a custom search which will have 3 inputs (dropdowns) , the html code of the form is ready and will use GET in url , now the remaining part is using values from url to run query. Parameters ...
1
vote
1answer
2k views

Search Custom Post Type & Taxonomies

The site I'm building has a directory element, which has a lot of different business listings; this is a custom post type. It has a Custom Taxonomy called Trades under which are different types of ...
-1
votes
1answer
775 views

Custom Search only for my Custom Taxonomy Page - data

First of all, my post is related to : Link 1 and Link 2 I made my custom taxonomy page. My Custom Taxonomy Page link is //localhost/myproject/?motion=aamir-khan This page is custom taxonomy page (...
1
vote
0answers
1k views

Removing “s” from search with custom parameters

I'm trying to do something that I thought would be quite simple and has turned out to be not simple at all. I've seen quite a few posts that look similar at first glance but none solve the issue for ...
-2
votes
1answer
71 views

Custom Field Search

I'm trying to create a custom search form that searches a custom post type that I have created. The form would need to search two custom taxonomies (similar to tags and categories) and the body text ...
1
vote
1answer
1k views

How to implement custom search with input fields?

I want to implement a search form like this: Loan Form In my theme I have a custom post type called Data with the Year and Money custom fields. I googled a lot but can't find a way to submit the ...
4
votes
1answer
10k views

Using pre_get_posts to rewrite search query to display posts from multiple taxonomies

This seems like it should be straightforward, but I'm stuck on it! If a user searches for 'alice', I would like to show them all posts with the custom taxonomy terms of 'bob' and 'carol', regardless ...
0
votes
0answers
2k views

Custom taxonomy displayed in search results

In my search results template within my WP site search.php, the function et_divi_post_meta() displays a posts meta data. What code would I use to display the the custom taxonomy that I created: '...
0
votes
3answers
5k views

How to perform a search inside a specific taxonomy category

My problem is this: I have 3 custom taxonomies, let's say 'author', 'title' and 'editor', each one applied to regular posts. Let's say I have post_1 that has in the 'author' field 'jorge borges' and ...
0
votes
1answer
919 views

Advanced WordPress search form based on custom taxonomy and custom meta value

I would appreciate if someone could help me out with the following issue. Here is the thing. I created two select boxes so I could filter and display posts from a custom post type based on two values -...