Search by City Hack - Solution
I bought classipress but i realised that it doesn't have the search functionality yet. To solve this problem for my classipress i hacked
WP Custom Search | By Don Benjamin, the solution is pretty simple but you will need a bit of css or html knowledge.
You will need to install ....
WP Custom Search..Version 0.3.16 | By Don Benjamin
After that you need to go to
wp-content>>plugins>>
wp-custom-fields-search>>Templates>>searchforms.css
and add the following css
Code:
.searchform-label {
display: block;
float: left;
overflow: hidden;
font-size:10px;
font-family: sans-serif;
font-weight: bold;
padding-top: 4px;
width:20%;
}
.searchform-input-wrapper {
display: block;
float: left;
text-align: right;
width:229px;
}
.searchform-input-wrapper .radio-button-wrapper input {
float: left;
}
#sidebar .searchform-input-wrapper input,
.searchform-input-wrapper input,
.searchform-input-wrapper select{
margin:0 2px;
padding:2px;
width:229px;
height:23px;
font:normal 10px/1.5em Arial, Helvetica, sans-serif;
background:#fff;
border:1px solid #949494;
float:right;
margin-bottom:8px;
}
.searchform-param {
clear: left;
}
.searchform-params {
clear: left;
}
.searchform-controls {
clear: left;
text-align: left;
}
.searchform-spoiler {
width: 100%;
text-align: center;
size: 0.5em;
opacity: 50%;
margin: 5px;
}
After that you need to go to
wp-content>>themes>>classipress>>sidebar.php
Add the following code after the first array, so that should be after
on line 20
Add the search box
<div class="shadowblock_out">
<div class="shadowblock">
<h2 class="dotted">Search this site </h2>
<?php if(function_exists('wp_custom_fields_search')) wp_custom_fields_search(); ?>
</div>
</div>
Now login to your wordpress dashboard.... Go to settings>>>
Wp Custom Fields Search>
Thats where you will add the cities etc.. remember they have to be also present in your custom fields you defined when setting up classipres otherwise it won't work...
To see a working demo, visit
http://unis-pour-servir.fr/, i'm afraid it's in French
All the best...
Vezu