To change the infobox size, do the following:
- Edit your map.
- Click on the menu “Infobox settings”.
- Change the infobox width by changing the value in the field “Infobox width”.
- Change the infobox height by changing the value in the field “Infobox height”.
Change the infobox image size
By changing the infobox size, you may also need to change the image size. To do that, follow these steps:
- Open/edit the file “functions.php” of your theme/child theme.
- Copy/Paste the following PHP code to add a WordPress custom image size. Make sure to specify/change the image width and height (in pixels) from 300 to your desired dimensions.
/** * Add new image size to use with "Progress Map" infoboxes. * Note: The first 300 is the width, the second is the height! */ add_image_size('cspm-custom-infobox-img', 300, 300, true);
- Copy/Paste the following PHP code to replace the default infobox image.
/** * Replace default infobox image */ function cspm_custom_infobox_img($default_thumb, $post_id){ $my_custom_img = get_the_post_thumbnail_url($post_id, 'cspm-custom-infobox-img'); $infobox_thumbnail = !empty($my_custom_img) ? $my_custom_img : $default_thumb; return '<img src="'.$infobox_thumbnail.'" />'; } add_filter('cspm_infobox_thumb', 'cspm_custom_infobox_img', 10, 2);
- Regenerate your images using a plugin like “Regenerate thumbnails”.
In the same context
- Set the infobox type
- Change the infobox description length
- Choose when to display the infobox
- Display infoboxes by reaching a zoom level
- Add a close button to the infoboxes
- Remove the infobox when the mouse leaves the marker
- Choose how to open the infobox’s link
- Build a custom title from custom fields for the infoboxes
- Build a custom content from custom fields and/or categories for the infoboxes
- Add ellipses (…) at the end of the infoboxes content
- Disable the infoboxes