-
AuthorPosts
-
September 16, 2019 at 12:33 pm #1138795
Hi there!
In this post you described how to use the video shortcode in the ajax preview (Setting: Show only preview text). Doesn’t this solution work any more? The shortcode works fine in the Single Portfolio item, but not in the ajax preview …
Do you have an idea?
Thanks
BerndSeptember 18, 2019 at 8:34 pm #1139681Hey profil77,
This is happening because over the Ajax Preview it is not registered.
To do this would require a lot of modification to be applied.Best regards,
BasilisSeptember 19, 2019 at 7:18 am #1139791Thank you, Basilis. Are you sure something is not registered? The video shortcode is displayed in the toolbar of the Ajax Preview area. And if I test a video as video slide of the Easy Slider shortcode, it works. I also think Josue’s advices are very helpful and very reliable. Why shouldn’t his information in the post be correct?
September 24, 2019 at 3:23 am #1141181Hi,
Sorry for the confusion.
You may need to use this filter to properly execute the video shortcode in the portfolio preview.
/** * Allow to force execution of shortcodes e.g. for plugins who call shortcode via an ajax call. * Enfold uses this to execute the shortcode for modal popup preview in backend * * @since 4.5.7.2 * @param boolean * @param aviaShortcodeTemplate $obj_sc * @param array $atts * @param string $content * @param string $shortcodename * @param boolean $fake * @return boolean true if sc should be executd regardless of page structure - same as popup preview */ function avf_custom_exec_sc_only( $exec_sc_only, $obj_sc, $atts, $content, $shortcodename, $fake ) { return true; } add_filter( 'avf_alb_exec_sc_only', 'avf_custom_exec_sc_only', 10, 6 );
Best regards,
IsmaelSeptember 24, 2019 at 8:28 am #1141257This reply has been marked as private.September 26, 2019 at 3:53 am #1142096Hi,
Thank you for the update.
The issue is that the video is not being initialized because the portfolio preview and its content is only created when you click on the designated item in the grid. This little snippet should re-initialize the video once the portfolio preview is visible.
add_action('wp_footer', function() { ?> <script> (function($) { $('body').on('av_resize_finished', function() { $('.av-lazyload-immediate .av-click-to-play-overlay').trigger('click'); }); })(jQuery); </script> <?php });
Add it in the functions.php file.
Best regards,
IsmaelSeptember 26, 2019 at 9:12 am #1142156Thank you very much, Ismael.
Please take a look at the frontend, the page with the portfolio grid. Whether with or without this snippet, the shortcode below the video shortcode is not shown in the Ajax preview, but in the footer of the page. Is it possible that the shortcode itself doesn’t work properly?
Best regards
BerndSeptember 27, 2019 at 9:33 am #1142608Hi,
Thank you for the update.
We found an unclosed column shortcode in the preview editor, but the result is still the same after fixing it. The content is thrown out of the AJAX preview, but we could not figure out why. Did you add any customizations in the theme aside from those suggested above? Can we deactivate the plugins temporarily?
Where did you add the “avf_custom_exec_sc_only” filter? We can’t find it in the functions.php file.
Best regards,
IsmaelSeptember 27, 2019 at 5:11 pm #1142835This reply has been marked as private.September 30, 2019 at 6:08 am #1143225Hi,
Thank you for the update.
We are able to reproduce the issue on our installation, but we can’t figure out why the “av-click-to-play-overlay” is being rendered outside the AJAX preview. We’ll forward the issue to the dev team. Please wait for their response. For now, please try to embed the video using an iframe tag.
// https://www.w3schools.com/html/html_youtube.asp
Best regards,
IsmaelSeptember 30, 2019 at 12:40 pm #1143358Thanks Ismael,
for the moment we’ll solve the issue with an additional image, which links to the video, opening it in a lightbox.
Best regards
BerndOctober 1, 2019 at 10:35 am #1143632Hi Bernd,
Great, I’m glad that you found a solution and thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardOctober 1, 2019 at 2:35 pm #1143761Hi Rikard.
We are waiting for a solution from your developers and for the next theme update. So you may close the topic.
Best regards
BerndOctober 1, 2019 at 11:31 pm #1143966Hi,
If you need further help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- You must be logged in to reply to this topic.