Tagged Questions
0
votes
0answers
27 views
Custom WP_Query for WordPress Search Results with meta_query
I am using a custom query to generate my search results. The code I am using works perfectly without the meta_query variables in my arguments array.
I am trying to compare multiple custom fields with ...
0
votes
0answers
46 views
Creating Advanced Search with text & Dropdowns
I am working to develop an advanced search option. Where there will be fields:
Text input Field (Post Title)
Dropdown (it will be a taxonomy)
Dropdown (it will be a taxonomy)
Basically I need ...
0
votes
1answer
33 views
How does Show Posts based on a keyword search work in WP_Query
I am wondering how the search go through by defining 's' parameter in WP_Query.
For example if I have a post assigned to "East" term in taxonomy "Direction", the post didn't mention any "East" or ...
1
vote
2answers
49 views
Trying to find a way to query post like normal search would do. within search.php page
I have a costume search in a site i am making.
When a user search a certain term, i want to display category list with a count of how many posts are found with in that category.
I thought of a way ...
0
votes
2answers
78 views
Custom search: Search posts but display parent page in results
I'm using Wordpress 3.5.1 with a modified twentytwelve theme.
My main site structure is based on the Smooth Slider plugin (jQuery Cycle).
I have Pages that contain only a shortcode (for example, ...
0
votes
0answers
92 views
Advanced Search Wordpress
I am trying to create an Advanced Search in Wordpress. The advanced search form is made of 3 dependent dropdown boxes (category: type, sub-category: brand, sub-sub-category: model).
It also has 5 ...
0
votes
1answer
163 views
Custom Search Result Page displaying only 1 result.
I'm trying to build a custom search results page. The problem I'm running into is that when I enter a search term ; say 'gaming', it will only return one result, being the latest result. I have my ...
0
votes
1answer
100 views
Wordpress search exact match
I have a few search filters set up and I found a few posts that shouldn't be in the search results. On looking into it further I found these posts match 'part' of the keyword.
For example, searching ...
0
votes
1answer
106 views
Search.php - return number of results but cannot loop through
I have a following search.php page (this is just the code required for problem presentation).
Why is my $total_results returning a number of posts found, but when I do a loop though it always print ...
3
votes
1answer
87 views
Search widget breaks when using multiple loops?
I have created wordpress template that uses two loops via WP_Query object. Everything works fine except Search widget. I've been pulling my hairs out for three days now Googling like a madman,but ...
4
votes
1answer
74 views
Tracing the life of a query
I can't find documentation regarding this - but is there a way to see how a query might bounce around from one filter to another? I've got a list of possible wp_filters and their relevance but I ...
0
votes
1answer
84 views
Can I make a search query which includes a space?
I want to search via WP_Query for the test "hello " including the last trailing space.
Is this possible and if so, how do I do this?
0
votes
1answer
190 views
Post_count only shows the number of results per page
I have a wp_query $wp_query = new WP_Query($args); but for some reason the $wp_query->post_count only shows the amount of posts on each page. So if I set 'showposts' => '10' and 12 results are ...
0
votes
1answer
61 views
Query posts by custom fields
I am making a theme for a hotel, and I need to be able to provide functionality to search by the following custom fields: Location and Price. I need to be able to query them from the query string ...
0
votes
2answers
76 views
Search Page Returns Nothing
I'm currently working on this website and a test shows that the search page isn't working properly. Every time someone searches for something, it comes up blank. The code for the search page is as ...
0
votes
1answer
145 views
Multiple keyword search
I have a custom search where I want to enter a keyword or phrase into the search box, and then by pressing enter it adds it to a 'search storage' (already coded, see below). Asume I have 3 posts, one ...
0
votes
1answer
351 views
Custom search form with empty parameters
I'm building a custom search form with keywords and drop down lists (categories, date, and country (have a separate plugin for this)).
In the searchform.php I have the input field and then ...
1
vote
1answer
346 views
Advanced search form with filters for custom taxonomies
I'm trying to build a complex search form with filters for several custom taxonomies, a search terms input and a select for the number of items displayed / page.
The question has been posted before ...
4
votes
1answer
591 views
AJAX search on post pages by custom post type
I'm having an issue creating an ajax search on my single post pages. I need to limit the search results to the custom post types "fod_videos" and "post" and category 12. My issue is the search is ...
0
votes
1answer
68 views
Search.php gets metadata from first post
I've got this in header.php in <head> section:
$page_color = get_post_meta($post->ID, 'page_color', true);
It works fine because it gets correct page_color for posts and pages but when I ...
0
votes
2answers
455 views
How Do I Use WP_Query to Run This Database Query as Search Result?
I have created a search box with a drop down box of 4 options to customize the search:
A general default search, no filter
A custom search according to the post title for a custom post type only.
A ...
3
votes
1answer
95 views
BP Multi Network & Members Directory
With bp-multi-network it appears members are shared across all networks.
Example - networks based on location.
newyork.mydomain.com, losangeles.mydomain.com, vancouver.mydomain.com
At present a ...
1
vote
1answer
1k views
How do I use wp_query for WordPress search?
I would like to create a custom search form to search posts based on the values of about 4 custom fields. I tried using wp_query to achieve this but so far my biggest problem is that the I don't get ...
0
votes
2answers
644 views
How to filter a static post page with ajax and $wp_query
I'm at a loss, I've found several unanswered questions related to this one. I have a static post page which has a search form in the sidebar. What I want to happen is to type in a keyword and then ...
0
votes
2answers
447 views
using pre_get_posts for search results not found
function hotlinkers_wp_query($query) {
if ( !$query->is_admin && $query->is_search) {
$search_query = str_replace('-',' ', $query->query_vars['s']);
...
1
vote
1answer
329 views
Including Custom Meta with posts_where query
I have been looking around to see how to do this but the solutions i've found don't seem to be working for me.
I'm making an AJAX powered search for some wordpress custom post types. I have got ...
3
votes
1answer
243 views
Want to redirect if search query match exact title of any post
I am using WordPress 3.3.1 and new to this system. I want to redirect the search query to the post if query exactly matches post title of some post.
I also want it to run before any search query ...
0
votes
3answers
726 views
Passing url parameters with search form [closed]
I'm trying to let users have a filter option when they submit a search.
My search form:
<form class="searchform" method="get" action="http://www.example.com/">
<input ...
0
votes
3answers
411 views
Using next/previous_posts_link with customised search
I have a few different searches on my website:
"Species profiles" (custom post type search)
"Glossary" (custom post type search)
Generic, site-wide search
Currently I'm using search.php; ...
0
votes
2answers
333 views
Customising wordpress search and using $_GET[“s”]
My theme's search.php currently has a few "IF" statements to deal with the different types of search that my website uses.
I have a site-wide search, a species (custom post type) specific search and ...
1
vote
1answer
305 views
AJAX search posts and pages
Im trying to make a plugin where i need to create an AJAX search.
Im using the method described in http://www.garyc40.com/2010/03/5-tips-for-using-ajax-in-wordpress/ to perform the ajax calls. So far ...
1
vote
2answers
585 views
How do I search inside specific taxonomies in Wordpress
I am trying to search for posts in specific taxonomies but any time I search, I get results from all the other pages instead of Wordpress searching within the selected category in the taxonomy.
I ...
1
vote
1answer
157 views
Search breaks when querying main loop for category
In my theme I provide an option for users to set a 'blog category' that queries and displays only posts from that category on index.php using WP_Query:
$shortname = get_option('of_shortname');
...
1
vote
1answer
2k views
Refine search results using WP_Query
I am trying to modify (refine?) Worpress search results by using WP_Query, just as it's explained in the Codex. The snippet featured in that article is on the top of the Search Template PHP file, and ...
1
vote
2answers
594 views
how to search in custom fields & custom taxonomy for custom search
I have a custom search which is a form that submits to the same page and uses wp_query to filter the results for a jobs site that I would also like the keyword search to also search in custom fields ...
0
votes
1answer
740 views
Why does 'exclude_from_search' exclude a custom post type from WP_Query?
In WP 3.1, it appears that setting 'exclude_from_search' = TRUE for a custom post type excludes the post type not just from searches on the front-end, but also from any post query using 'post_type' = ...
4
votes
1answer
2k views
Search multiple custom fields by using meta_query
I'm trying to create a search results listing for a custom post type and the problem I'm running in to is with the way the 'meta_query' parameter is stringing the passed values together. It appears ...