Pronamic Google Maps
[resolved] SEARCH PRONAMIC MASHUP (3 posts)

  1. taz_bambu
    Posted 3 years ago #

    Hello and many thanks for the wonderful plugin.

    I have created a front end form to allow users submit a custom post type.

    Now, I have created a page to show the mashup.

    I am trying to allow users , apart from just having a look to the mashup,
    to be able to search through it bu the use of an input field for the area / location (i have custom fields for city and country etc. apart from pronamic address meta).

    So far I have built this:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <form action="" method="post" name="searchgroup" id="searchgroup"><fieldset>
    <legend>Search for Groups in your Area!</legend>
    	<input type="text"  name="address" id="address"  placeholder="type your area" placeholder="Type your Area"/>
    	<input type="submit"  name="submit" id="submit" value="Go"/>
    $input = $_POST['address'];
    $query1 = new WP_Query( array('post_type' => 'any' ));
    $query2 = new WP_Query( array('meta_value' => $input ));
    if (	get_post_meta( get_the_ID() ) == $input	)
    else pronamic_google_maps_mashup($query1);

    My query for the meta value does not work yet.

    Any ideas?
    Am I missing something? Is there any other way to do that?

    Thank you in advance!


  2. Remco Tolsma
    Plugin Author

    Posted 3 years ago #

    This goes a little beyond the support we can give on our free Google Maps plugin. But maybe you can figure it out with the following example:

    $args = array(
    	'meta_query' => array(
    		'relation' => 'OR',
    			'key' => 'your_city_meta_key',
    			'value' =>  $input,
    			'compare' => 'LIKE'
    			'key' => 'your_country_meta_key',
    			'value' =>  $input,
    			'compare' => 'LIKE'
    			'key' => '_pronamic_google_maps_address',
    			'value' =>  $input,
    			'compare' => 'LIKE'
    $query = new WP_Query( $args );

    See for more information also the WordPress documentation:

  3. taz_bambu
    Posted 3 years ago #

    Thanks very much for your prompt support.
    I am testing this in the mean time.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Pronamic Google Maps
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic