Hi @met45,
Generally, we resize the detail image to fit it into your theme, but if you’d like to use the full dimensions of your image, you can add the following filter code to your functions.php file:
add_filter( 'da_detail_image_size', 'my_da_detail_image_size', 10, 4 ); function my_da_detail_image_size( $size, $hotspot, $img_post, $settings ) { return 'full'; }
Once this code is in place, you should see the full image size being used for the detail image.
Please let us know if there’s anything else we can help you with.
Thread Starter
met45
(@met45)
Hi,
Thank you for your answer.
Unfortunately i am stupid for coding…any time i copy the code i get this Parse error: syntax error, unexpected ‘;’ (T_STRING).
Could you help me how to paste the code?
<?php
// Exit if accessed directly
if ( !defined( ‘ABSPATH’ ) ) exit;
// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED – Do not modify or remove comment markers above or below:
if ( !function_exists( ‘chld_thm_cfg_locale_css’ ) ):
function chld_thm_cfg_locale_css( $uri ){
if ( empty( $uri ) && is_rtl() && file_exists( get_template_directory() . ‘/rtl.css’ ) )
$uri = get_template_directory_uri() . ‘/rtl.css’;
return $uri;
}
endif;
add_filter( ‘locale_stylesheet_uri’, ‘chld_thm_cfg_locale_css’ );
if ( !function_exists( ‘chld_thm_cfg_parent_css’ ) ):
function chld_thm_cfg_parent_css() {
wp_enqueue_style( ‘chld_thm_cfg_parent’, trailingslashit( get_template_directory_uri() ) . ‘style.css’, array( ) );
}
endif;
add_action( ‘wp_enqueue_scripts’, ‘chld_thm_cfg_parent_css’, 10 );
// END ENQUEUE PARENT ACTION
Hi @met45,
Can you please try this piece of code and let us know if that works for you?
add_filter( 'da_detail_image_size', 'my_da_detail_image_size', 10, 4 );
function my_da_detail_image_size( $size, $hotspot, $img_post, $settings )
{return 'full';};
Hello it seems like the above code works on your website, you just need to add a bit more CSS to get the detailed image to look bigger.
Try this CSS snippet, just make sure to replace the {id} with the id of the image, for example write #hotspot-1234.layout-left NOT #hotspot-{id}.layout-left
@media (min-width: 900px) {
#hotspot-{id}.layout-left .hotspots-image-container,
#hotspot-{id}.layout-right .hotspots-image-container {
-webkit-flex: 0 0 50%;
flex: 0 0 50%;
}
#hotspot-{id}.layout-left .hotspots-placeholder,
#hotspot-{id}.layout-right .hotspots-placeholder {
-webkit-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
}
We’re happy to hear you got it working!!
Let us know if there’s any other questions we could help you with 🙂
Thanks,
Natalie G