Forum: Nearby Posts

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support related to the Nearby Posts premium extension please open a new premium support ticket.

[Resolved]Add Website/Phone/Content to Nearby Locations

Forums Nearby Posts Add Website/Phone/Content to Nearby Locations

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #51320
    Tyler Smith
    Member

    How can I have post listings display phone numbers, website, and post content while using the Nearby Locations add-on? Those fields all display on other searches, but not Nearby Locations.

    Thanks,

    Tyler

    #51326

    Hello Tyler and thank you for the purchase.

    At the moment the easiest solution would be to create a custom results file and place it in the theme/child theme. Then, in the custom template file you can add any additional information as you wish.

    Are you comfortable with creating a template file and adding some PHP to it if I will guide you through?

    I now realize that I didn’t place any hooks in the results template files of the plugin. I will however add the hooks in the next release of the plugin. That will make it easier to add custom information.

    Let me know if you want name to guide through the creation of the custom template file.

    Thanks,

    #51382
    Tyler Smith
    Member

    Some guidance on the creation of these files would be great.

    Also, is there a way to link the listed locations to the corresponding post? Right now each listing under the map links to the homepage of the site, not the post where the information is being pulled from.

    Thanks,
    Tyler

    Private Content Hidden
    #51416
    Tyler Smith
    Member

    Just wanted to check in and see if you guys had any answers on this. We are using the plugin for a client’s website and if I can’t get this to work soon, I’ll have to move on to another option.

    Thanks,
    Tyler

    #51422

    Hi,
    I created a custom “lightcoral” results template file. You can download the zip file from here.

    To use the custom template follow the steps below:

    1) Unzip the file so you will have the “lightcoral” folder.

    2) In your theme’s or child theme’s folder ( which ever you are using ) create the folders geo-my-wp/nearby-locations/posts/

    3) Copy the “lightcoral” folder from the zip file into the “posts” folder you have just created.

    4) Test it and see if the custom information is showing.

    To the custom template file I added the website, phone and content fields. This information can be found in lightcoral/content-single-item.php file. You can edit this file to modify the information as you wish.

    Let me know if that helps.

    #51433
    Tyler Smith
    Member

    That looks great! I just have a few follow up questions:

    1. How can I make the websites actually link to the websites instead of being static text?
    2. Right now the post title (ex: Ashford At Feather Sound) links back to the homepage instead of the actual post. Is there a way to fix that?
    3. In the file you created, it looks like the page content should display under the website, but it does not. Is there a way to make that display?
    4. How do we get this same information into the popup on the map?

    Thanks again for the help!
    Tyler

    #51441

    You are welcome Tyler.

    How can I make the websites actually link to the websites instead of being static text?

    replace:

    with this script.

    Right now the post title (ex: Ashford At Feather Sound) links back to the homepage instead of the actual post. Is there a way to fix that?

    This should not be happening. Would you please verify which version of Nearby Location you have installed and let me know?

    In the file you created, it looks like the page content should display under the website, but it does not. Is there a way to make that display?

    It should display, it does on my test site. It might be related to issue number 2 ( with the link to the home page ). Again, please let me know which version you have installed.

    How do we get this same information into the popup on the map?

    This can be done using a filter and a custom function. The filter is

    and can be found in gmw-nearby-locations/includes/gmw-nearby-locations-calss.php. It does require some PHP and WordPress knowledge to accomplish.

    I hope that helps.

    #51469
    Tyler Smith
    Member

    The code works great for linking the Website information!

    Right now I am running Nearby Locations 1.1. On the download page, it lists Nearby Locations 1.0.2, but that download is actually “gmw-nearby-posts-1-0-2-5-31-2014.” Is that what is supposed to download?

    If I have both Nearby Locations 1.0.2 and Nearby Posts 1.0.2 activated at the same time, it causes a fatal error on the site: “Fatal error: Cannot redeclare class GMW_Nearby_Posts in /home/radcoresidentia9/public_html/wp-content/plugins/gmw-nearby-posts/gmw-nearby-posts.php on line 56”

    Am I missing something?

    Thanks,
    Tyler

    #51496

    You should have only one install activated.

    I uploaded a new version – 1.1 beta 3. Please download it from Your Account page and give it a try.

    Let me know if that fixes the links issue.

    Thanks,

    #51506
    Tyler Smith
    Member

    One issue is kind of solved, but the other is not.

    Resolved
    The issue with the post headline linking to the homepage is resolved, but it only works when the Permalinks are set to “Plain.” Any other setting, like the preferred Post name, still redirects to the homepage instead of the link.

    Unresolved
    The page content is still not displaying under the website even with the updated plugin. I did notice the other sections refer to “post_data” while that section only says “post.” Is that an issue?

    Thanks,
    Tyler

    #51507

    Thank you Tyler,

    The issue with the post headline linking to the homepage is resolved, but it only works when the Permalinks are set to “Plain.” Any other setting, like the preferred Post name, still redirects to the homepage instead of the link.

    OK, I am going to look into that.

    The page content is still not displaying under the website even with the updated plugin. I did notice the other sections refer to “post_data” while that section only says “post.” Is that an issue?

    The $post_data holds GEo my WP’s contact information and the $post holds the post information which should also have the content in $post->post_content. Unless, the contact you are referring to is not being saved in the post content area but in a custom post field or some other field?

    #51556
    Tyler Smith
    Member

    I have created a login for you to the site if you want to poke around and see what information is not showing up.
    http://whatisyourmove.com/?p=67 is an example. In the normal text area, I have written: “This text is not showing up on the home page. Keep in mind, I have this URL redirecting to http://whatisyourmove.com/?page_id=83 so that I can use the Page Builder.” None of that shows on the homepage.

    Private Content Hidden
    #51562

    HI Tyler,
    I believe that it doesn’t show because you are using the page builder. Maybe because all the content of the page builder is wrapped within shoetcodes then it doesn’t show.

    You need to refer this question to the page builder team and ask them how to display the content of a post within a PHP template file. Mention that you tried using echo $post->post_content but it doesn’t work.

    I hope that helps.

    #51653
    Tyler Smith
    Member

    What would it take to have the map popup display:

    – PROPERTY NAME
    – Address
    – Request information (link to property)
    – Get directions
    – Image

    In the listings below the maps, is there a way to have the words “Request Information” link to the property page?

    See attached image for a mockup.

    Thanks,
    Tyler

    #51654
    Tyler Smith
    Member
Viewing 15 posts - 1 through 15 (of 27 total)

You must be logged in to reply to this topic.