0
votes
1answer
13 views

search form leads to 404

I'm using the follow code in my functions.php to add a search box to my primary nav menu - add_filter('wp_nav_menu_items','add_search_box_to_menu', 10, 2); function add_search_box_to_menu( ...
0
votes
0answers
41 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
46 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
1answer
20 views

child_of not working while searching

I'm trying to limit search to a parent page and its own child pages. I've changed searchform.php adding this code: <input type="hidden" value="<?php global $post; $ancestors2 = ...
0
votes
1answer
78 views

Search with filters and title

I would like to search in custom_post by title and by the ACF fields. So, I used the WP_Query WordPress function but I can't filter by the title, just by the filters. When I submit my form, I have ...
2
votes
1answer
194 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
42 views

Search box background on a different page template

I'm trying to make the search box background the same as the homepage, but for some reason there is a orange background - it doesn't use a different header.php its called within a filter the code ...
1
vote
1answer
2k views

Filter custom post type using multiple taxonomy dropdowns

I'm trying to create two dropdown boxes on a custom post type page called Activities. One taxonomy category is for Activities Grade Level and the other for Activities Type. With what I have now, if ...
1
vote
1answer
132 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', ...
1
vote
1answer
749 views

How to apply filter at search of woocommerce products?

I want to change woocommerce search. And want to limit the search to Product title and Category and Tag only excluding description and short description. Search Form is in ...
0
votes
0answers
41 views

Adding Search Filter on Informational Website

Background: Say I am creating a website for a popular mobile brand. On this site I will have "informative" articles. Every mobile will also have a short overview, followed by specs and images of the ...
0
votes
0answers
288 views

Filter posts by multiple checkbox categories

I would like to set up a widget to filter my post by categories. Let's say, I do have two different categories, "Countries" and "length of stay" with sub categories. Here is an example of what I have: ...
0
votes
1answer
504 views

filtering custom post types via meta data drop down

I'm trying to add drop down filters (that are populated by terms that are in use) to a custom search page for "opportunities" or listings page. Currently I am doing this with taxonomies but doing this ...
1
vote
1answer
250 views

Custom search form to display users only

I'm trying to build a custom search form for one of my pages. I need the search form to be able to search for users. Not only will it need to search for users, but by first name, last name etc.. ...
1
vote
1answer
121 views

Using ob_get_content to get_search_form puts into infinite loop

I am trying to change the look of my searchform. It basically needs to have two text fields. I want this to be in form of a plugin, which anyone can activate. SO obviously I do not have any control ...
0
votes
1answer
319 views

How to Add Additional Search Button?

I have added function to functions.php so authors can search only their published content. I would like to add additional "Search my posts" button to searchform.php so only logged in users would see - ...
0
votes
2answers
58 views

How we make the filter for fornt end user

I develope a filter for posts so that when any user come to my site they can filter the posts on the base of cities/state. So when i store the posts i just store the cities name as a post-meta tag in ...
1
vote
0answers
346 views

Refine/Filter the Search Results by Category

I am currently creating the process of a function which allows one to refine results, Namely by category. Similar to themeforest.net refine the search results. When i gave as search term "Hello" and ...
1
vote
0answers
140 views

Admin search post meta

I have currently built a property database using WordPress and am purely using the back-end for the whole job. I am listing all the properties and used a plugin called "Easy Filter" to add custom ...
1
vote
1answer
2k views

Filter results with custom field values and dropdown

I need to filter posts by a custom field value. My specific example: User browse to products > category 1 > subcategory A. ALL "subcategory A" items (products custom post type) are displayed as ...
1
vote
1answer
915 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
68 views

Hightlight search-terms with functions does remove or disable other filters?

I found the following two functions in order to highlight the current search term on my search-results page. function search_excerpt_highlight() { $excerpt = get_the_excerpt(); $keys = ...
0
votes
2answers
81 views

Filter and Search

I am working on my site which is a WordPress based site. It is a sweepstakes site well winprizesonline.com is the site which inspired me most. Now I want a dynamic search like that site on my site but ...
2
votes
2answers
415 views

Search results sorted by post types

I am working on a site with several post types - 4 to be exact - and I am trying to setup the search results page to have a filter/sort the results by post types. For example, when a person searches ...
2
votes
1answer
370 views

Rewriting search and pagination base

After trying for weeks now how to find a working solution I got rid of most of my functions and trials and just left the pagination function underneath in my functions.phh file: /** * Pagination ...
2
votes
1answer
847 views

Custom search filter causes menu and query_posts problems

I'm using a custom search filter (using my custom query var type), like so: function fteh_pre_get_posts( $query ){ if( isset( $query->query_vars['type'] ) ) $types = explode( ',', ...
0
votes
1answer
46 views

Add Filter to Ignore a Post/Page or a Number of Post/Pages

Hoping someone can assist but as part of normal WordPress theme searching, how can I add a filter as part of the search to not include certain posts/pages as part of my LOOP? For example, I want the ...
0
votes
1answer
829 views

filter custom post type by meta key in dashboard

I'm looking for a way to expand e customize more this topic how to filter post listing (in WP dashboard posts listing) using a custom field (search functionnality)? I've a custom post type in the ...
1
vote
1answer
410 views

How can I make a search form that can search taxonomies and posts?

I have a search bar on the homepage of my theme. I want the user to be able to select from a drop down to search for everything, posts, or taxonomies. I looked at the wp_dropdown function, but its ...
0
votes
1answer
139 views

Taxonomy search filters

I have developed an educational courses database of several countries using several taxonomies. Country, institute, study level and some other are taxonomies. If user click on some country, all ...
0
votes
1answer
141 views

Modifying search results based on post_type

Is there an easy way to highlight search results based on post_type? I am using Job Manager plugin and when a site search is performed, I want to simply add a note e.g. (Job) next to the Job Results. ...
1
vote
1answer
673 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
244 views

conditional search

I am looking for help with a conditional search based on four categories/taxonomies; countries/regions/type/no of bedrooms. What I am after is a dropdown search function that when I select a specific ...
1
vote
1answer
922 views

How to filter WordPress search, excluding post in some custom taxonomies?

I want to filter WordPress search (and also WordPress listing of posts) on 2 values of a custom taxonomy. I tried this code, filtering my custom taxonomy named "marque", excluding 70 or 67 IDs (nb : ...
1
vote
1answer
702 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 ...