Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • in reply to: Hide/Remove Members from Results Map #55907

    Hi Eyal,

    Many thanks for the response and my apologies for the late reply.

    I have tried your code above but it seems to be wiping all members from the search results now.

    Perhaps I should elaborate:
    As far as Buddypress is concerned, all members will be “Active”. The only thing that makes a member “Inactive” is the data contained in a buddypress XProfile field, “Membership Status”.
    What I need to do is hide these members from the location map if this xprofile field contains the value “Inactive”.

    From what I can tell from your code above, it looks like the:

    is referencing the Buddypress “Active” status.
    Do you know how to pass this function the data from an xprofile field as a condition instead?



    in reply to: Hide/Remove Members from Results Map #55831

    I have just realised that a function already exists to remove members from the results/map if they have no location set.

    I could accomplish this by removing each deactivated member’s location but this is not ideal.
    I would love a more elegant solution to this if possible.

    in reply to: Map results Info Window design #55830

    Hi Joseph,

    You can modify the order of the infobox content in the following location:

    wp-content\plugins\geo-my-wp\plugins\friends\includes\gmw-fl-search-query-class.php – At approx line 301 you will find a function called “public function info_window_content( $member )”. The $output variable here is what holds the infobox content. Re-order as necessary.

    The CSS is located in wp-content\plugins\geo-my-wp\assets\css\style.css – One of the classes I have identified at a glance is called “.wppl-fl-info-window”. I recommend using Firebug for Firefox or Chrome to play around with the CSS.

    Happy tinkering 🙂

    in reply to: Dynamic Search Results #54991


    Would really appreciate some input on this if you have time.

    in reply to: WP All Import to import Fields into GeoMyWP #54983

    The code didn’t really come out too well in the last reply.
    Here it is again without the code tags:

    in reply to: WP All Import to import Fields into GeoMyWP #54982

    Hi Pascal,

    Eyal helped me out with this very same issue not so long ago (thanks Eyal!!!) and I managed to get it working. I figure the least I can do is try to help you out as well.

    Keep a couple of things in mind:
    1) The following is for Buddypress Member locations, not posts.
    2) I am still pretty new to PHP so I am sure there are 50 better ways to do what I did. But it works for me.

    First, read this thread:

    The function gmw_update_user_location() is what we’ll be using to geocode the member’s location on import. From what I can tell, there are two ways to do this:

    1) Find a hook in WP All Import plugin that “runs” after each imported member. You need to use this hook to “execute” a function that will “grab” the address of the imported member, geocode this address and save the data in the database.
    Since I used Import Users From CSV With Meta plugin, I didn’t have such a hook. So I had to go with option 2.

    2) I copied all the file contents from geo-my-wp/includes/geo-my-wp-user-update-location.php into my child theme’s functions.php
    Then I called the function directly from within the importer while passing the user ID (already defined in the importer php file) and the address that was ti be uploaded fom the CSV file into a BP XProfile text field called Mailing Address (in the format: 12 Example Street Suburb State Zipcode Country):

    Hopefully this can get you started!

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