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 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • #51682
    Tyler Smith
    Member

    Eyal,

    This is William Rodriguez, I am a web developer helping Tyler with this issue.

    I have disabled the Visual Composer and tested the content population, and it’s still not showing up. I think it’s safe to say that is not the issue. I plan on trying to disable the other plugins to rule those out as well. Can you show me what files I need to review within the plugin directory that relates to the content being populated in the area that it is not currently?

    Any other help would be appreciated. If this doesn’t work, I am going to try and edit the code for the plugin to see if we can work around this issue.

    Thanks,
    William

    #51687

    Hi William,
    The file you should be looking at should be in the theme or child theme folder/geo-my-wp/nearby-locations/posts/lightcoral/content-single-item.php.

    In the file you have access to the $post object which should have the post content in $post->post_content which works fine on my test site.

    I am not too sure why it doesn’t display the content for you. You can also try to get the content using the get_the_content() function.

    I hope that helps.

    #51755
    Tyler Smith
    Member

    That doesn’t seem to be the file related to the post popup on the map. Where is that file?

    #51760

    The file I mentioned above holds the content of each location in the list of results.

    If you are looking to modify the map’s info-window content then there is no file for it. You will need to use the filter hook:

    Which can be found in gmw-nearby-locations/gmw-nearby-locations-class.php near line 385.

    I hope that helps.

    #51768
    Tyler Smith
    Member

    Eyal,

    I actually had it pulling content into the listings below the map, but it was pulling the page content and not the post content. I tried all kinds of filtering and such, nothing worked. Do you have any idea we can work around this, or pull the correct content?

    I also tried to play around with the info-window content, nothing seemed to work. Same issue, it wanted to pull the page content and not the specific post content.

    Thanks,
    William

    #51771

    Hi William,
    Try adding global $post; at the beginning of the content-single-item.php file as well as in your custom function for the info-window hook.

    #51775
    Tyler Smith
    Member

    It is still not working. Any other suggestions?

    Thanks,
    Tyler

    #51784
    Tyler Smith
    Member

    Eyal,

    I ended up adding “advanced custom fields” plugin and adding the content to the listings below the map that way.

    When I try to add those areas to the map info-window the content is not added to the info-window but above the listing in the area below the map. Do you have any idea why this would happen? No matter which way I add the new custom field in the info-window, it always shows up above the listing and not within the info-window.

    Any help would be appreciated!

    #51795

    When I try to add those areas to the map info-window the content is not added to the info-window but above the listing in the area below the map. Do you have any idea why this would happen?

    I believe that the function you are using is echoing the profile field value instead of “getting” it.

    Can you please post the custom function you are using for the info-window?

    #51871
    Tyler Smith
    Member

    I was using a few different function variations, but none of them seemed to work. Nothing special when it came to the code.

    How would you suggest coding the function?

    #51882

    This example should add the post content to the info window. However, it will append it below the main info-window content. You need to manipulate the $output array in order to add the additional content where ever you want.

    #52064

    This topic marked “Resolved” due to inactivity. If you wish to reply to this topic please change its status to “Not resolved”  before replying.

Viewing 12 posts - 16 through 27 (of 27 total)

You must be logged in to reply to this topic.