0
votes
0answers
61 views

Add input fields to Wordpress search to search custom fields

I have 2 custom fields: first and last. My goal is to add 2 new input fields (first and last) to search their respectable custom field. Here's my form code in searchform.php: <form role="search" ...
1
vote
0answers
12 views

edit search.php to include subdomain posts

Is there a way for us to edit the search.php to include the subdomains with its search results? The only "condition" the code has is... ...and I have really nothing more to go by. =/ And oh, I ...
0
votes
0answers
24 views

Custom Search not working

Can any Wordpress Guru figure out why my custom search form just reloads the page when submitted? I'm trying to create a custom search that uses two dropdowns only (no text input). The first ...
0
votes
0answers
69 views

Search inside a custom taxonomy for multiple words doesn't return anything

My goal is to perform a search inside a custom taxonomy field. The page is an archive including a lot of books and magazines, and they have to be searched through, let's say, 'Authors','Title' and ...
0
votes
1answer
27 views

WordPress Search

I'm trying to write a search feature on a website of mine, and it seems like it's not pulling in any of the pages, only posts. Below is the code. Search Form: <form role="search" ...
0
votes
1answer
143 views

Wordpress pagination not working in search result page

I have a problem with pagination on search results page. The page links appear, but when i click onto page 2, it gives me a 404 error. Page 1 : ...
0
votes
1answer
36 views

Search page results conflicting logic - Search result caching?

I recently stylized my search page results from the base template _S, and got everything to work quite nicely. I've developed it to return false/positive header/body. It should only return a positive ...
0
votes
0answers
21 views

Processing empty search TwentyTen

On my website when you submit an empty search box it takes you to a page that says nothing found however the navigation menu isn't displayed but it does when you enter a search term (whether it finds ...
0
votes
1answer
87 views

Select All not working in a WordPress search filter

I am trying to create a Search Filter within WordPress to filter through all the custom taxonomies within a Custom Post Type. I have created a function that generates the dropdown so I can output ...
0
votes
2answers
77 views

have_posts() execution failure

I wanted to create a loop which displays search results in search.php file. I followed all of the instructions in the WordPress Codex tutorial located in here: https://codex.wordpress.org/The_Loop ...
0
votes
2answers
39 views

Can I use HTTP POSTs? Is there a better alternative?

I am use to php development in general and I am use to getting a lot done by making a POST to a php file. However I have not seen people using $_POST in WordPress. I have seen one discussion about ...
0
votes
1answer
90 views

Search in particular category in wordpress

I am currently using the JSON API to get the data from wordpress http://wordpress.org/plugins/json-api/other_notes/ The plugin helps to retrieve the wordpress post data in JSON format I notice that ...
0
votes
1answer
78 views

Different layout on search page depending on category post

I would like to display different layouts for post with different categories on the search page: I tried with this code: <?php if(isset($_GET['the_category'])) { $type = ...
0
votes
2answers
71 views

Make the text field in search form optional

I've added some custom fields to my search form, which will be used more frequently than the original text field (<input name="s" />). However, the text field seems to be required to perform a ...
1
vote
0answers
65 views

Search Query: how to construct a search string from two select elements?

Im trying to create a wordpress search widget. The final search string Im trying to submit is made up of two keywords, one each from a select element. I'd like the final search query to be ...
0
votes
0answers
28 views

Search form is not working in live site

I have installed a wordpress theme called suffusion. Search widget is not working in this theme. It shows nothing found always. I have search.php as below. It is working in local machine <?php ...
0
votes
0answers
54 views

Ajax Auto Complete Convert All Plural Text To Singular

I am trying to create a wordpress search plugin that if you enter a text or keyword term, it would automatically convert any plural text to singular text e.g. "dogs" will become "dog" I am already ...
1
vote
2answers
697 views

esc_url returns incorrect URL

What would be the reason for <?php echo esc_url( home_url( '/' ) ); ?> to be sending me to an incorrect website? I use it in my search bar and when I search a value it sends me to one of my ...
0
votes
1answer
49 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 ...
0
votes
1answer
38 views

Search through documents folder

Does anyone know why the following returns nothing? <?php $dir = get_bloginfo('template_directory') . "/documents/*"; foreach(glob($dir) as $file) { echo $file; } ?> I ...
-1
votes
1answer
2k views

Eliminate duplicates in a foreach loop [closed]

I've created a filter for my search results that allows people to filter user searches based on their State from their profile. The problem I am having is that there are duplicate states showing in ...
0
votes
0answers
482 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
798 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
0answers
46 views

How can i retrive the movies, trailers, news in a single page using search

How can i retrive that. For a few month i build a website, and i want to make it diferent For the search i have 3 post type, and i have for each diferent themes for display - Movies - Trailers - ...
3
votes
1answer
150 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 ...
1
vote
1answer
305 views

Add relevant tag to search results

Tags are a major part of my platform. Using the default search, if the search term matches a tag, on the results page, I want it to display: <p>Are you looking for our <a ...
0
votes
1answer
42 views

Trying to put a search page on site

i'm trying to put a search page on my site. I thought it would be simple, but I am having no success. I have put a form in my header.php (which I call in my search.php page (include "header.php")) ...
2
votes
1answer
475 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 ...
0
votes
3answers
146 views

How can i display 3 post types in same page?

How can i display 3 post types in same page search results. http://cinema.trancelevel.com/ For example i have post_type1-Movies post_type2-Trailers post_type3-Subtitrari Wen i search i want to ...
0
votes
1answer
103 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
1answer
105 views

split searchresults into different topics?

How could I split the searchresults into topics. I have e.g. three Topics - cars | computers | culture all are "custom post types" . Now a user searches for term "speed" in the searchbox and the ...
1
vote
1answer
610 views

Customising the search function?

I'm rebuilding this website - http://www.mediwales.com/news on the WP platform. I'm struggling with the search area in the grey box. I'm removing region and date so we don't have to worry about ...
-1
votes
2answers
1k views

How to strip/remove all blank spaces at the beginning/end of a search string

I use hack of Chris_O for highlighting the search terms. When a user enters the search keywords without any blank space in the beginning or at end of the search string it retrieves and highlights the ...
0
votes
2answers
69 views

search and add in wordpress content

I have a wordpress plugin that displays videos through a shortcode. My problem is it assigns the div's with ID's such as video-1-player, video-2-player, etc. I need to create a function that searches ...
1
vote
2answers
116 views

Can anyone offer any help with this function?

I am trying to write a function for my functions.php file. I has to do the following; loop through search results and check the template if the template is 'landing.php' add it to ad array use the ...
2
votes
2answers
235 views

Comment filtering (search)

Basically I want to develop the ability to search comments on my site. A form with input field where the visitor can enter a search string, which tells WP to display only comments that contain that ...