btees
Forum Replies Created
-
Hi Maxim,
Thanks for your time.
I don’t expect you to give customisation advice, so I’ll understand if you don’t reply or whatever.
But hopefully if I throw this out to the community someone will come up with something π
Here’s my code now:
<?PHP $type = "hello"; $name_title = $_POST['derp']; if($_POST['submit']) { $name_title = $_POST['derp']; ?> <?php } else { ?> <div id="propertysearch"> <div id="printit"><?php print_r($_POST ["wpp_search"]["property_type"]); ?></div> <div id="printit2"><?php print_r($_POST ["derp"]); ?></div> <section id="searchpropertieswidget-4" class="widget wpp_property_attributes"><div class="wpp_search_properties_widget"><span class="wpp_widget_no_title"></span> <form id="" name="" action="http://seoanseo.ie/property/listings/" method="post"> <div class="label-input-wrapper"> <ul class="wpp_search_elements"> <li><div class="form-label">Title</div></li> <div class="form-input"> <li> <input id="property_type" class="" name = "wpp_search[property_type]"> <select id="demo" type="hidden" name="derp" onchange="myFunction()"> <?php $names = array( '' => 'Any', 'house_rental' => 'House (rental)', 'apartment_rental' => 'Apartment (rental)', ); foreach ($names as $key => $name) { $selection = ($key === $name_title) ? 'selected="selected"' : ''; echo '\t<option value="' . $key . '" ' . $selection. '> ' . $name . '</option>'; } ?> </select> <script> function myFunction() { var x = document.getElementById("demo").value; document.getElementById("property_type").value = x; } </script> </li> <li class="wpp_search_form_element submit"><input type="submit" class=" searchmargin wpp_search_button submit btn btn-large" value="Search"></li> </ul> </div> </div> </form> </section> <?php } ?>So I tried
$_POST ["wpp_search"]["property_type"]which didn’t seem to work.Then I set up a duplicate field that fills in the same info, it’s name is derp and it’s id is demo.
When I set up two divs to print the what is posted, nothing shows up in the divs on the search result page.
If I comment out the field that goes through to wp properties search likes so:
<!-- <input id="property_type" class="" name = "wpp_search[property_type]"> -->when the inputs post the value is printed on screen.
Is it somehow not posting on the search results page?
Hi Maxim,
Thanks for that.
In the end I used:
/* Place your custom functions below */ //* Link properties to categories taxonomy add_action( 'init', 'sk_add_category_taxonomy_to_properties' ); function sk_add_category_taxonomy_to_properties() { register_taxonomy_for_object_type( 'category', 'property' ); }to achieve this, it seems to suite my purposes here.
But that plugin looks pretty interesting, so I’ll definitely play around with it to see what I might achieve with it.
Forum: Plugins
In reply to: [Client Dash] Custom search (and keeping dropdown inputs)Apologies guys, I was obviously way more tired than I though, this request for for an entirely different plugin. I have no idea how this got here!
Forum: Plugins
In reply to: [Client Dash] Custom search (and keeping dropdown inputs)Here is my updated code:
<?PHP $name_title = $_POST["wpp_search[property_type]"]; if($_POST["submit"]) { $name_title = $_POST["wpp_search[property_type]"]; //Check the name title that it is selected or none. if($name_title === none){ //if selected is none, add error to $errors array. $errors['name_title'] = "Please select the title of your name!"; } // sending form if(empty($errors)){ $mail_sent = wp_mail( $to, $subject, $mailBody, $headers ); } } if ($mail_sent) { ?> <h1 style="color: #007f00;">Request sent.</h1> <?php } else { ?> <div id="propertysearch"> <section id="searchpropertieswidget-4" class="widget wpp_property_attributes"><div class="wpp_search_properties_widget"><span class="wpp_widget_no_title"></span> <form id="" name="" action="<?php echo get_permalink(); ?>" method="post"> <div class="label-input-wrapper"> <ul class="wpp_search_elements"> <li><div class="form-label">Title</div></li> <div class="form-input"> <li><select id="wpp_search_element_6302" class="wpp_search_select_field wpp_search_select_field_property_type property_type" name="wpp_search[property_type]"> <?php $names = array( '' => 'Any', 'house_rental' => 'House (rental)', 'apartment_rental' => 'Apartment (rental)', ); foreach ($names as $key => $name) { $selection = ($key === $name_title) ? 'selected="selected"' : ''; echo '\t<option value="' . $key . '" ' . $selection. '> ' . $name . '</option>'; } ?> ?> </select> </li> <li class="wpp_search_form_element submit"><input type="submit" class=" searchmargin wpp_search_button submit btn btn-large" value="Search"></li> </ul> </div> </div> </form> </section> </div> <?php } ?>It seems the problem is specifically that the select name has square brackets in it, so my $name_title = $_POST[“”] isn’t reading it. If I change that to something without square brackets the dropdown remains filled as desired, but of course doesn’t do the search then.
Does anyone know if it’s possible to:
a) wrap the name in such a way that my $name_title = $_POST[“”] can read it
or
b) Change the name of the select within the plugin to something I choose, so it activates the search on my select name
?
Many thanks for any input!
Forum: Plugins
In reply to: [Contact Form 7] Sent Message not showingHave also tried with default theme with same result.
Thanks sareiodata,
In the end I just wrote a step by step for the site owner on using custom fields, but this is good to know for next time.
Hi,
Yes it’s on a language specific page.
We worked around the problem by editing both Event manager and WPML EM references to locationajaxurl to include search&lang=en as above.
The only slight issue remaining is that Locations created by users via the event submission form are being created as though they are in the language of the form the user is on (i.e. if they’re on the Irish translation of the form the location is created as Irish and therefore not showing up in the locationajaxurl dropdown we edited)
This is the case even though we have not set locations to be translated as location translation was causing another problem that escapes my memory at the moment.
If you had any idea how to force the location to save as en, that would be greatly appreciated.
Thanks.
Any ideas on this?
We tried to change line 312 of events-manager.php to:
‘locationajaxurl’ => admin_url(‘admin-ajax.php?action=locations_search&lang=en’),
Which seemed to work briefly as a work around, but it’s gone again.
it also isn’t ideal as we want it to show all locations, not just English.
WPML, sorry I tagged it but didn’t put it in the body of the question π
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] WPML EM MAPAny ideas on this?
I’m currently looking at other map plugins to use instead of EM’s built in one, but getting the location info to pass over to their custom fields seems fairly complicated for me.
any input you might have would be greatly appreciated.
-Barry
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] WPML EM MAPHi Angelo,
Yes, if an event is posted in Irish it shows up om the Irish map, if it is posted in English it shows up on the English map.
The shortcode is:
[locations_map country=”IE” width=300 height=400 scope=”future”]
Although scope is only a recent addition and the problem has always been there for any use of [location_map] while EM WPML connector is turned on.
Forum: Fixing WordPress
In reply to: 301 redirect wp. to www.Hello again,
I’m not sure if I should start a new topic for these additional questions or not, they are related.
Since taking the above steps my Google Analytics account is showing wp.example.com/referal as a source/medium.
Is there any way for me to work around this? It’s no use for me to know that people are coming from wp.example.com, I want to know what brought them there.
My UA from google is pasted into the header of the theme as normal, not really sure why it’s registering as a referral site.
Any advice greatly appreciated.
Forum: Fixing WordPress
In reply to: 301 redirect wp. to www.Hi Esmi,
Thanks so much for this.
I finally got around to doing it late one night. It’s done exactly what I wanted.
It seems to have caused one minor annoyance that you may be able to help me with
Whenever I try to preview a blog post or edits to a page, the page shown will be http://www.example.com/?p=3063&preview=true
This either shows a 404 or tells me I don’t have permission to preview the content.
The ‘work around’ I’ve started using is manually changing the www to wp each time I land on a preview page (e.g. wp.example.com/?p=3063&preview=true)
This works, but is a little time consuming, particularly if I need to preview the page five times in a row.
Thanks again,
Barry