Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
$30
Search function for room rental ads
I had a plug in created so that visitors could advertise rooms for rent on a website.
www.christianrooms.com/wordpress
I am trying to get a search function/plug in written where the visitor can search for rooms by certain criteria.
The visitors need to be able to search by:
Location (where they fill in their own text, and the info is pulled from the “local area” data)
Rental Type – (a drop down box with the following options: nightly, weekly or monthly taken from the rental type data)
Then they click a button with “Search Rooms” and are presented with a list of available accommodation which I’m assuming could be taken from the “Rooms Available” page maybe.
Does anyone know of a ready made solution that would do this OR anyone up for creating it for me.
Any advice or help would be much appreciated
Many thanks
Steve
Steve Watson | 12/09/11 at 9:44am
Edit
Tutorial: How to assign prize money
(5) Possible Answers Submitted...
See a chronological view of answers?
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
-

Last edited:
12/09/11
9:50amMilan Petrovic says:I am in the process of developing plugin GD Products Center that will be used to add products by type (this can be rooms), and set up categorization/properties/specification/images/videos for each product, different product pages, search/filter capabilities and more. Currently is in Beta, with about month of development left. You can check out news about plugin and development, and request demo to test it:
http://www.dev4press.com/archive/plg-gd-products-center/blog/
http://www.dev4press.com/request-demo/ -

Last edited:
12/09/11
9:52am -

Last edited:
12/09/11
9:55amSébastien | French WordpressDesigner says:This plugin could search several data (each data is in a custom field)
http://wordpress.org/extend/plugins/wp-custom-fields-search/
I have made an advanced search for loft (not room) here : http://www.lestetesdepub.com/location-lofts but it is a long workPrevious versions of this answer: 12/09/11 at 9:55am
-

Last edited:
12/09/11
9:55amLuis Abarca says:I made this sites with a similar funcionality
http://mchome.com.mx/propiedades/
http://ihata.com.mx/
I'm using custom taxonomies for filter the search in both sites, and a custom table for room availability in the second one.Previous versions of this answer: 12/09/11 at 9:55am
-

Last edited:
12/09/11
10:00amJohn Cotton says:Does anyone know of a ready made solution
You're almost there as it is....
You need a form in your search area (I'm guessing that's a widget?) with this kind of code in:
<form method="post" action="http://www.christianrooms.com/wordpress/my-ads/">
<select name="location"><!-- pull the values from your local area - don't get them typing in or else potentially you'll have missed matches for typos</select>
<select name="type"><!-- pull from your rental types (get_terms) --></select>
<input type="submit" value="Search" />
Then, on the my-ads page (template or archive.php?) you get check for $_POST value and adjust the query...
<?php
if( isset($POST(['location']) ) {
$filter = array(
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'location',
'field' => 'slug',
'terms' => array( $_POST['location'] )
),
array(
'taxonomy' => 'rental_type',
'field' => 'slug',
'terms' => array( $_POST['type'] )
)
)
);
// merge your new query with the existing one for this page
query_posts( array_merge( $wp_query->query, $filter ) );
}
?>
And that should do it!
This, of course, assumes location and rental are taxonomies. If they are not (eg they are custom fields) just adjust the query above.
JC
This question has expired.
Current status of this question: Community pot
Please log in to add additional discourse to this page.
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
