0
votes
1answer
31 views

search.php is not generating the right results

I have a situation that didn't happen before. My search.php file didn't generate results, it just loop through all posts although the url is correct Domain_name/?s=key Here is the searchform.php ...
0
votes
1answer
51 views

Need help setting up a search form for wordpress [duplicate]

I want to set up a search function as a widget in wordpress. This is the situation that I have. 1- I have 3 custom post types 1.a: Each post type has custom fields and taxonomies. I have regular ...
0
votes
2answers
42 views

Modify Search Query if original Query gave no results

I'm looking for a way to modify the search query if the performed query returned no results. Let's say I'm looking for "Opening times", so I go to this URL: http://mysite.com?s=Opening+times Now, ...
0
votes
1answer
181 views

How to manage a particular “order by” for get_search_query()?

How to manage in the search.php file the order of a posts search query managed with the following code <?php echo sprintf(__('%s Zoekresultaten voor ', 'website'), $wp_query->found_posts); echo ...
0
votes
1answer
24 views

Custom Same Page Search

I've added a custom form to one of my page templates. It submits to itself $_SERVER['REQUEST_URI'] in hopes I can grab the $_GET values and modify my query using pre_get_posts, but instead it goes to ...
-1
votes
3answers
158 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
117 views

Run search query again without pagination gives no results?

Update: This question isn't really relevant anymore. I switched some code, so now the filtering works. Looks like the query wasn't working, because I triggered the indexTaxonomyCounts function from ...
0
votes
1answer
2k views

Search custom post type by meta data

I have a custom post type 'Property' which my users need to be able to search by meta data. I have 3 search functions - 2 on the frontend 1 in the admin area - 2 of which are running as expected and ...
0
votes
2answers
247 views

Get a list of posts by specific category

I'm trying to build a search query in PHP in WordPress and I need to get all posts by a specific author in a specific category including drafts. For example, is it possible to do something like, ...
0
votes
1answer
43 views

search meta field for a value in all posts

Hi I want to search meta field for a value in all posts. Code below shows what i want to accomplish (im wp and php beginner and cant manage to make it work by myself). If in meta field "voted_IP" ...
1
vote
1answer
170 views

How to go about combining dropdowns / filter queries?

I'm coming up short with my googling here. (As 'filter' in wordpress always turns up more content related info). Anyway, my situation is this: I have Categories, Tags, Authors and Archive dropdowns ...
1
vote
1answer
193 views

Attempt to improve WP search, can someone check my SQL query?

I'm stumped. I've done a bunch of work to filter what posts get pulled in a WP search and then even more work sorting those after they're pulled from the DB. My main problem now is getting results ...
1
vote
0answers
100 views

Post 2 Post Site Search

I'm trying to filter search terms bases on categorisation created by posts 2 posts. I'm using the generic site search and then I've created a search filter function my_filter_the_search($query){ ...
1
vote
1answer
133 views

Searching With Apostrophe

I'm having trouble with my custom theme's search function. I have a number of posts with apostrophes in the title. For example, McDonald's. However, when I try searching say McDonalds, the post won't ...
0
votes
3answers
172 views

search through post-type attachments titles

I have a page where I show all the attachments of a page in a table which has id=10. I have hundreds of attachments and I would like to implement an AJAX search form that uses the title of attachment ...
0
votes
2answers
379 views

How to exclude custom fields from search queries?

I'm building a hotel search engine and I've first created a custom content type "hotel" with Types & Views Toolset. I'm using "Search everything" plugin to query custom fields and custom taxonomy ...
1
vote
1answer
1k views

Custom search page and search by title, content and tag

Can someone review my code , I need to know better solutions or any bug. Okey ! , I made a PHP file to get search results by parameters and search by title , content and tag PHP's head look like: ...
0
votes
1answer
69 views

How do I find users by password?

I need to add a passkey to each user, so I decided to just giving the user password that value and use WP functionality to store it/retrieve it. So now I need to find what user that password belongs ...
0
votes
2answers
336 views

Include different loop templates in search query

I have differnet Custom Post Types in my blog. I also have custom templates for each of them like loop-{$cpt-name}.php I would like to include different cpt templates dynamically in search results ...
2
votes
1answer
340 views

How can I get all posts data from within a paginated search result?

Let's say I'm doing a search on my site, and get 50 posts as a result. The pagination is set to 10 posts per page, so I have 5 pages of results. When I'm on the first page of results, if I inspect ...
1
vote
2answers
775 views

Search queries don't seem to work?

I have a problem with search queries. Anytime you put additional queries, like: mywebsite.com/?s=wordpress&post_type=page mywebsite.com/?s=wordpress&post_type=page,post ...
0
votes
1answer
364 views

SQL: Search query to get attachments only of those parents which are published

i'm having some problem creating nice 1 query to be able to get search results which includes NOT only post_type POST but also attachments. BUT if search query return attachment, i want that it won't ...
0
votes
1answer
607 views

How to query two meta fields and display results between them

I am making a search form that searches for posts within two meta box values and display results between them. I have this set $prefix = 'ghes_'; // start with an underscore to hide fields from ...
0
votes
1answer
3k views

How do I create a meta box for dates?

I am creating a custom events page and I want to know how to create a custom meta box to save event dates. I don't want it to be a regular meta box because I will be using this to make a custom search ...
1
vote
2answers
4k views

How do I search events between two set dates inside WP?

I am building a WP site with an events feature. The events page was made with custom post types. I want to make it possible for people to search/ filter events by dates. For example, they can search ...
0
votes
1answer
115 views

Wordpress search results

I have installed Job Manager and managed to filter the search to only display jobs (i.e. post_type = jobman_job) and it works ok however, when displaying the search results, it only shows the title - ...
1
vote
2answers
1k 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
774 views

Wordpress Search Filter Only for Page with Child of Child of Child of Child of Child

after browsing question from this site I found the workaround for this: function SearchFilter($query) { if ($query->is_search) { global $post; $query->set( 'post_parent', 21 ...
0
votes
1answer
746 views

Searching with Multiple (Parallel) Criteria on Custom Fields?

I'm just an basic Wordpress user. I need to make search box with multiple criteria inputs (multiple conditions) to search inside various Custom Fields. For example including following Custom Fields: ...
0
votes
1answer
129 views

Form Data Causes “Page Not Found”

If you go to http://redoakchrysler.net/vehicles/new-vehicle-inventory and select 2012 from the drop down menu in the years list, you will be taken to a 'page not found' page. But if you select any ...
1
vote
1answer
810 views

How to limit search to first letter of title?

I was wondering if there was a way to make the search only look for the first letter in the posts title, basically let's say my search query is www.mysite.com/?s=q I'd like to get all posts that start ...
3
votes
3answers
609 views

Fulltext search in posts sorted by relevancy

I'm building a custom search page and what I need is to sort results by relevancy (eg. occurences of a keyword) Using MySQL docs I've built this query: SELECT ID FROM $wpdb->posts WHERE MATCH ...
0
votes
2answers
707 views

get_the_category and echo out link to child-most/deepest category

I have this code which is located on the search.php page and retrieves all the categories for each post and echo's out a link to the first category: $category = get_the_category(); ...
0
votes
1answer
1k views

Custom Permalinks Break Search Pagination

So I'm having a weird issue that I've never seen. I have a search.php set up like this: $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts($query_string . '&paged=' . ...
1
vote
3answers
478 views

Search and replace text across all posts

I had used the ZD Video Plugin for WP a long time, and now, since my move to WP 3.0.2, it doesn't work anymore. To embed a YouTube video using the plugin, I would just write ...