Forum: F.A.Q

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support and general questions related to GEO my WP plugin and its core add-ons please use the support forum.

Add New Text Field

Forums F.A.Q Add New Text Field

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #34567


    I am trying to make a keyword search

    How do I add New Text field which can search data from my word press titles & description content

    I have tried creating a text box, for example my Tittle is “My name is” when I give any of these 3 words in search for example ” name” then it does not show  my listing  but when I give compete keyword ” my name is” then it does

    I get the following on search when I give any word like “name”

    SELECT SQL_CALC_FOUND_ROWS wposts.post_id,, wposts.long, wposts.address, wposts.post_title,, wposts.fax,, FROM wp_places_locator wposts WHERE (1 = 1) AND wposts.post_title LIKE ‘abcd’ AND wposts.post_id IN (2417,2414,2413,2343,2061,2063,2059,2053,2050,2037,2035,1978,1982,1983,1984,24,20) ORDER BY wposts.post_title LIMIT 0,10


    Please help


    Hi Tomgrow,
    I am already planing to add a text field for a post title lookup ( not for description). I am not sure how to exactly do it right now but it seems that you are in the right direction. I am away in my country right now for 3 weeks so I don’t get to work on the plugin. However , if I’ll have a free night to look into it I might get it for you. But I can’t promise. But when I will be back I will to release an update of few bug fix so I’ll try to add this function already by then.



    Thank you for your reply.

    I wish if you get a free night soon so my problem gets resolved




    I need this also…


    i did not forget you jacqui 🙂
    i will probably add this feature in the next update when i’ll be back in two weeks or so. i just can’t find enough free time here to do it.



    I have done it



    Tomgrow, this is great. Could you post a link so I could see ? And maybe post the solution here for Jacqui and other users that are looking for it?


    This is how I did
    First added a text box field in file (/wp-content/plugins/wordpress-places-locator/get-places.php)
    <input type=”text” name=”wppl_searchk” class=”wppl-address” size=”35″ value=”‘. $_GET[‘wppl_searchk’] . ‘”  size=”35″‘;echo($address_title ==1) ? ‘placeholder=”Enter a keyword . .”‘ : “”; echo  ‘ />

    Added  above text filed value in search query in file ((/wp-content/plugins/wordpress-places-locator/get-places.php)

    First check the above textbox filed value is blank or not

    $searchk = $_GET[‘wppl_searchk’];

    if ($searchk != “”)


    $searchkk = “AND (((wposts.post_title LIKE ‘%$searchk%’) OR (wpostsw.post_content LIKE ‘%$searchk%’)))”;



    After that

    $sql =”SELECT SQL_CALC_FOUND_ROWS wposts.post_id,, wposts.long, wposts.address, wposts.post_title,, wposts.fax,,, wpostsw.post_content, wpostsw.ID {$calculate}

    FROM ” . $wpdb->prefix . “places_locator as wposts INNER JOIN ” . $wpdb->prefix . “posts as wpostsw       ON wposts.post_id = wpostsw.ID


    (1 = 1)

    {$searchkk} AND wposts.post_id IN (” . implode( ‘,’ , $query->posts) . “)

    {$having} ORDER BY {$order_by} LIMIT ” . $from_page . “,” . $per_page  ;


    After that you need to comment the below line.

    //$sql = $wpdb->prepare($sql,$values);


    It works for me

    let me know if I did it correctly



    Hi Tomgrow,
    i just saw your replay, Thank you.
    it seems to be the way to do it but i will work on it after next week when i be back home and i will let you know. I will probably add it to the plugin together with some bug fix.

    Thank you



    Are you back home?

    Any update please



    Hi tomgrow,

    yes , I came back last week. I have been workin  on bugs  since then and trying to get it done. I have to get that ready together with othe premium version. Honestly, I did forget about the text box but now when you reminded me I’ll see if I can push it to this update coming.

    is your solution works? Have you had any issues with that?



Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.