0
votes
1answer
34 views

Search page for custom post type

I am new to wordpress and a beginner coder, and i was searching around the net, found solutions but still does not work. I have custom post type named dlm_download, and my custom search template not ...
-2
votes
1answer
22 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 ...
0
votes
0answers
32 views

select to search in category AND custom post type

I try to do something but which I block. What I need is simple: a search textbox and a select which allows the user to search either in whole or in custom post types, or in category. Separately, I can ...
0
votes
0answers
42 views

Custom Post Type, Taxonomy, and Geo-Coded Radius Search

I've been struggling with this for the last few days and just keep seem to get it right. Here's the situation: I have a provider directory (hospitals) in a custom post type. The 2,000+ providers were ...
2
votes
2answers
89 views

CPT Meta Searching

I'm developing a WP plugin which uses custom post types and meta data. What I'm trying to achieve is having the meta data searchable. Here is some code that I found which searches the meta data fine, ...
0
votes
1answer
57 views

Custom post type blog pagination conflict

I have a custom post type called 'emp_case-studies' and it has a page archive. Here is the code for archive-emp_case-studies.php: <?php $blog = $wp_query; $wp_query= null; $args= null; ...
0
votes
1answer
51 views

Limit search field to just search a custom post type with custom fields

I'm sure this is possible, I just don't think I am going the right way about it. Basically, I have two custom post types (Investigators & Centres), both of which have search forms on their ...
2
votes
1answer
117 views

How to make a WP_Query search with custom post types?

I've registered a custom post type called "node". When I create a basic WP_Query to get posts of that type, it works just fine. Example: $args = array( 'post_status' => 'publish', 'post_type' ...
0
votes
0answers
16 views

WP_Query For Custom Author and Single CPT Search?

I have created a search page where users can search the site with these options: (1) Keyword (2) Keyword in/from 12 different Custom Post Types (CPT's) (3) Keyword in/by a single Author's posts ...
0
votes
0answers
55 views

Wordpress Admin Panel Search posts with custom post meta values along with title

Trying to modify default admin search by including search by custom post type fields, Below is my code, function custom_search_query( $query ) { $custom_fields = array( // put all the meta ...
0
votes
0answers
49 views

Invalid post type admin

I've added some custom post types, but for some reason I keep getting this message: 'Invalid post type' whenever i try to search a post in the backend or when I try to do a bulk action. Hope someone ...
0
votes
1answer
43 views

Is it good practice to search for custom posts based on custom field values?

I am building a theme for a local roofing company and we need to implement a solution for users to be able to search through custom posts and find what they're looking for based on custom field ...
0
votes
0answers
40 views

Diffrent search templates for different post types

I have a site with diffrent post types. Two of them are the 'post' post type and the other one is 'charity', for both pages I have an index, the normal index.php and a diffrent page template for ...
0
votes
0answers
45 views

Advanced Search Filter

I am a beginner at php and I have been using the facetious plugin to create an advanced search form using my custom taxonomies. My problem is that my client has now asked for it to be even more ...
0
votes
0answers
49 views

How to search attachments (images) and posts in WordPress of a given post type

I'd like to extend the search functionality in a WordPress blog in order to search a custom post type including its attachments. I got some progress searching posts and attachments, also excluding ...
0
votes
0answers
42 views

Search a specific custom field values in a specific custom post type

Hello WordPress developers, In my site, I have created a custom post type called "BOOKS". And In that custom post area there's a custom data field called "Author". Now, what I want is add a search ...
0
votes
1answer
44 views

Custom filter for main search: how to exclude specific post_type from search results

Is there a way to use WP_Query's method, set(), in order to exclude a specific post_type from a global search. Here was my unsuccessful attempt: function _search_all($query) { ...
0
votes
0answers
7 views

paginate_links issue with keyword search results [duplicate]

I am using paginate_links but it is building the URL in the wrong order when on a search results page with a keyword. Because of the structure of my site I am using GET for the search with a custom ...
0
votes
0answers
33 views

Change output of the function

Below is the Current Function function ajax_result($arg, $id,$pagenumber){ $apiclass = new ajaxwpqsfclass(); // The Query $query = new WP_Query( $arg ); $html =''; // The Loop ...
0
votes
0answers
60 views

Cannot get query var 'post_type' to work

I am struggling to get the post_type query var (as referenced from http://codex.wordpress.org/WordPress_Query_Vars) to work. This is what the URL looks like: ?s=microsoft&post_type=bg but it ...
1
vote
0answers
61 views

BBPress Search results in Wordpress search

I want to display in Wordpress search results page - 10 or less found results from BBPress (plugin) forums. I know that BBPress use custom post types (forum, topic, reply) but I don't know how to do ...
2
votes
1answer
192 views

WooCommerce product search titles only

I had asked this earlier and solved it using the Relevanssi plugin, however that plugin is now breaking things so I can't use it anymore. How is something so freaking simple made so impossible by ...
0
votes
1answer
71 views

Search CPT Title AND Meta

I currently have a CPT I would like to search, the catch is I also need to be able to search the meta data for the CPT. I have the following code that currently searches the meta value needed but I ...
1
vote
1answer
134 views

Backend search; include CPT meta?

I've currently got a CPT with 2 part titles; I've got everything working perfectly on the frontend. But when it comes to searching for a post, the post you're searching for doesn't always show up ...
1
vote
1answer
93 views

Multiple meta_values in the pre_get_posts filter?

I have a custom post type with custom fields, the one in particular is "zip". I also have an array that stores like 20 different zip codes. I want to check to see if any of those custom post types ...
1
vote
1answer
116 views

Search Custom Post Type with all meta attached?

I'm currently have a search box that's supposed to search a certain post type. It's supposed to check the query against all standard cpt content, tags and the associated meta data. I'm wondering how I ...
0
votes
0answers
183 views

Adding meta query search filter that works with taxonomy filters

TL:DR How do I specify a dynamic meta value for search queries? I have [this archive page] that allows to do search within filtered taxonomies 1: <?php $term = $wp_query->get_queried_object(); ...
1
vote
0answers
50 views

Limit Search to Post Type With Apostrophe return search not found

I limit the search to post type in wp default search engine by adding a hidden field. <input type="hidden" name="post_type" value="books" /> But I got a problem when the search string that ...
0
votes
1answer
1k views

Custom search for custom post type, custom meta and search fields

Id like to build a search form for a specific custom post type (vehicle) and have filters for that custom posts type's custom meta fields (price, age) and custom taxonomies (make). This will totally ...
0
votes
0answers
150 views

Include Meta Box data in search

I have created a custom post type named archive with its own search filter, powered by: <form class="searchformcustom" action="<?php echo home_url( '/' ); ?>" method="get"> ...
1
vote
1answer
131 views

Search filter triggered & sort by custom post type

I am using a plugin (Relevanssi) and a custom function to sort the search results by custom post types (see below). This is working great. add_filter('relevanssi_hits_filter', ...
0
votes
1answer
157 views

Multiple search template with separate stylesheets

I'm building a site which needs to have two search bars and two search results templates. One of the search bars is for regular posts, and the other is for a custom post type. I need the two search ...
0
votes
0answers
155 views

Set Custom Post Type in Widget Settings for use in Widget

I'm trying to dynamically list all of CPT's in a dropdown, set one in the widget settings and then echo that value in the actual widget output. I can't seem to get it to work though. I was trying to ...
0
votes
1answer
367 views

Search that will look in custom field, post title and post content

I am looking for a way to perform a search, and while performing the search, it checks a custom field named keywords, the post title and the post content. If any of those fields have results like what ...
0
votes
1answer
662 views

filter search result with custom post type meta key

The default search returns all post types, which is what I want. But for one specific custom post type I want to limit the result to a specific meta key value (a custom date that must be greater than ...
2
votes
1answer
347 views

Admin Area Custom Type Search By Meta Fields Without Title & Content

I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code: ...
2
votes
1answer
96 views

Customize Search Results for Custom Post Type

Is there a way to use a custom PHP template for search results of a custom post type. I know that you can have specific archive and category templates for custom post types. For example, ...
0
votes
2answers
921 views

Search Post Title Only

I'm using the standard WordPress search form to search a custom post type. Here is my code: <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>"> ...
0
votes
1answer
370 views

How to order separated Custom Post Search results

I am using the technique described here Seperating Custom Post Search Results and here posts_groupby problem to seperate my search results and group them by post type. This means I have the following ...
0
votes
2answers
158 views

Problem with custom post type search

I built a custom search with the following code: functions.php function template_chooser($template) { global $wp_query; $post_type = get_query_var('post_type'); if( ...
4
votes
2answers
8k views

How to create a custom search for custom post type?

I have a search field for the blog posts, but I need an other for a custom post type. How can I create this custom search form with a different search result layout?
0
votes
1answer
225 views

Building a Data Intensive Website with Wordpress

I am an intemediate website builder and have been working with wordpress for a few years. I am attempting to build a website (for myself) that is data intensive. All I've built to date are sites ...
2
votes
1answer
172 views

Custom Fields vs Separate Table

I have a client who wants to be able to upload Posts using information stored in a CSV file. I've already got this portion working. Just recently, I changed the CSV File Uploader from pure PHP to an ...
1
vote
0answers
33 views

Displaying and searching Custom Posts

I'm trying to convert my existing web site from old-school HTML to WordPress, and have created a series of Custom Posts for my whisky tasting notes. However, I'm stuck trying to set up a page that ...
1
vote
1answer
131 views

Customize Search to only search current custom post type

I have 3 custom post types and want the search widget to only search the custom post type it's currently on. ie. If viewing cpt_1 (single or archive) and someone uses the search widget in the sidebar ...
0
votes
1answer
150 views

Search by tag name and category

How can I return all posts that match a specific taxonomy using <?php get_search_form(); ?> For example: if a user enters a search query that matches the name of a tag or category, search.php ...
-1
votes
1answer
252 views

Drop Down Filter with CPT as Options for Search Form

I am trying to figure out how to create a drop down to use as a filter with the search form. I would like the options to be the different post types. I've seen on other sites that - <select ...
2
votes
1answer
739 views

Exclude from search all custom posts which are NOT in a taxonomy term

I have a custom post with a taxonomy associated to it. That taxonomy only has one term, and posts either belong to it or not, in a boolean fashion. On the search results, I wish to show the custom ...
0
votes
1answer
1k views

Add custom attributes to a post

My blog is mainly composed of posts describing hiking. Actually, since I just moved from a Wordpress.com blog to a self-hosted Wordpress blog, every hike is inserted in a simple post. However, every ...
3
votes
2answers
2k views

How do I paginate search results for custom post types?

I have a Custom Post Type called "cars" that stores several custom fields along with the standard Title/Description fields. I need users to be able to search through the CPT based on the custom fields ...