You find it under Impreza, Page Blocks, Tourist Spot Page Block!
Please check the image for it!
Minesh
Supporter
Sprachen:
Englisch (English )
Zeitzone:
Asia/Kolkata (GMT+05:30)
Thank you. After deep investigation, I found that the issue is the shortcode added to iframe do not get rendered:
- when I check the source code in page soruce it looks like as given under:
<iframe src="[types field='location-video' output='raw'][/types]" width="420" height="345"><br />
</iframe>
Additionally, I found that if I change the content template form here:
=> versteckter Link
And try to apply the content template or Layout build with Tooslet it does not get effect. So, your theme looks like taking over the control what to render and discards whatever we set to display with Toolset (content template or layout).
The only way I found to share solution with you is I've added the following code to "Custom Code" section of Toolset:
=> versteckter Link
function func_display_iframes() {
global $post;
$location_video = $vimeo_video = '';
$location_video = get_post_meta($post->ID,'wpcf-location-video',true);
$vimeo_video = get_post_meta($post->ID,'wpcf-vimeo-video',true);
if($location_video != '' and $vimeo_video == '') {
$str = '<iframe src="'.$location_video.'" width="853" height="480" frameborder="0" allowfullscreen="allowfullscreen"></iframe>';
} else if ($location_video == '' and $vimeo_video != '') {
$str .= '<iframe src="'.$vimeo_video.'" width="853" height="480" frameborder="0" allowfullscreen="allowfullscreen"></iframe>';
}
return $str;
}
add_shortcode( 'show_iframe', 'func_display_iframes' );
And then displayed the shortcode [show_iframe] with your page builder text module;
=> versteckter Link
I can see now iframe is rendered correctly:
=> versteckter Link
Dear Minesh
Ok, yes. But on this, where I used to get an image, versteckter Link it is still not okay...
Question, why you did not use the child themes function.php, to create the short code function?
Maybe we include the image part too, in there.
As I mentioned earlier, having the closing [/wpv-conditional] is not working somehow. Could also be a theme issue. But maybe we can fix this too?
Regards,
Minesh
Supporter
Sprachen:
Englisch (English )
Zeitzone:
Asia/Kolkata (GMT+05:30)
Question, why you did not use the child themes function.php, to create the short code function?
==> Because if you will change the theme, you need to copy/paste the code to functions.php file again. But as we added the code to custom code section, it will not be the case if you change the theme.
More info:
=> https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/
Ok - I've updated the code as given under:
function func_display_iframes() {
global $post;
$location_video = $vimeo_video = '';
$location_video = get_post_meta($post->ID,'wpcf-location-video',true);
$vimeo_video = get_post_meta($post->ID,'wpcf-vimeo-video',true);
if ($location_video == '' and $vimeo_video == '') {
$str = do_shortcode("[wpv-post-featured-image size='center' class='img-responsive']");
}else if($location_video != '' and $vimeo_video == '') {
$str = '<iframe src="'.$location_video.'" width="853" height="480" frameborder="0" allowfullscreen="allowfullscreen"></iframe>';
} else if ($location_video == '' and $vimeo_video != '') {
$str .= '<iframe src="'.$vimeo_video.'" width="853" height="480" frameborder="0" allowfullscreen="allowfullscreen"></iframe>';
}
return $str;
}
add_shortcode( 'show_iframe', 'func_display_iframes' );
I can see now the expected results:
=> versteckter Link
My issue is resolved now. Thank you!
Dear Minesh
Thank You to solve this issue and problem. I just saw a bit more behind the scene of toolset.
Regards,
Simon