• Resolved whatsonkids

    (@whatsonkids)


    Hi all

    Does anyone know if it is possible to change the content of the little info window that pops up when you click a location icon? I don’t like that the address is a link, and I’d like to add the associated category.

    So basically all I want at this stage is the business name, address without a link and the category (if this is possible).

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @whatsonkids,

    There are settings available to control what appears on that window, but the items aren’t editable I’m afraid. You can configure this from Directory Listings > Settings > Map: https://i.imgur.com/IAHYpzb.png
    If you want your address to be unclickable (i.e. not a link), you can override the default template. In this case, you’ll have to edit the template for OpenStreet Map (assuming, you use this one, kindly let me know if you use Google Map). This particular template is located under ‘templates/archive/fields/openstreet-map.php‘ and edit the ‘if’ block starting from line #59 to this:

    
    		if ( ! empty( $ls_data['address'] ) ) {
    			if ( ! empty( $display_address_map ) ) { ?>
    				<div class='osm-iw-location'>
    					<span class='<?php echo atbdp_icon_type(); ?>-map-marker'></span>
    					<span class='map-info-link'><?php echo $ls_data['address'] ?></span>
    				</div>
    				<?php
    			}
    

    Learn more about template overriding here: https://directorist.com/documentation/directorist/developers-guide/template-override/

    Hope this helps, let me know if there’s anything I can help you with.

    Regards,
    Mahdi.

    • This reply was modified 2 years, 11 months ago by Mahdi.
    Thread Starter whatsonkids

    (@whatsonkids)

    Thanks Mahdi.

    Very helpful and a step in the right direction ??

    IF only I could have the categories, then it would be perfect!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add content to pop up on on map’ is closed to new replies.