-
AuthorPosts
-
April 24, 2020 at 10:41 am #1206761
Hello,
how are you?
On my website I want to prevent self-hosted mp4 Videos from looping. Unfortunately my webmaster skills are not sufficient enough to follow the steps described here. What excactly do I have to do? Thank you very much in advance for your assistance!Best regards!
April 26, 2020 at 12:49 pm #1207247Hey ClimbingSocks,
These are the step you gave to follow from the thread above to stop the video form looping in the video element:
Best regards,
VictoriaApril 27, 2020 at 3:30 pm #1207530Hello Victoria,
thank you for your reply. I have already been aware of the link you posted and even referred to that link in my first post from 04/24/2020. My problem is that I don’t know how to access and edit the files section.php and functions.php of my child theme. These are the two files, which I am supposed to change, right? But how can I access and edit these two files?
The problem I face is that I can’t find the editor under appearance. Under appearance I can only find themes, customizer, widgets and menus. There is no editor I could edit the files section.php and functions.php with.
Thank you very much in advance for further assistance.Best regards!
- This reply was modified 4 years, 7 months ago by ClimbingSocks.
April 29, 2020 at 6:41 pm #1208248Hi ClimbingSocks,
You can edit the files via the FTP, cPanel, or check if you have a plugin that is hiding the Appearance > Editor hidden, normally it’s some security plugin.
Best regards,
VictoriaApril 29, 2020 at 9:50 pm #1208327Hi Victoria,
today I tried the following steps:- copy enfold/config-templatebuilder/avia-shortcodes/section.php file into enfold-child/shortcodes/ folder
- open section.php in child theme and find
'video_loop' => true,
and change it to
'video_loop' => false,
- open functions.php in child theme and add following code:
add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1); function avia_include_shortcode_template($paths) { $template_url = get_stylesheet_directory(); array_unshift($paths, $template_url.'/shortcodes/'); return $paths; }
Unfortunately after these changes the website was down and showed a fatal error. So I removed the code from the last step as I realized that a similar code existed already in section.php which was:
function avia_include_shortcode_template($paths) { $template_url = get_stylesheet_directory(); array_unshift($paths, $template_url.'/shortcodes/'); return $paths; } add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
Now the website works again, but the videos are still looping!
How can I change the videos from looping? Please provide further assistance! Thank you!- This reply was modified 4 years, 7 months ago by ClimbingSocks.
May 5, 2020 at 3:05 pm #1209985Hi,
Thank you for the update.
You should create a new folder in the child theme directory and name it “shortcodes”, then create a copy of the section.php file inside. You don’t need to replicate the actual path of the shortcode in the parent theme.
Best regards,
IsmaelMay 29, 2020 at 9:40 pm #1217863Hello,
sorry for asking again, but I am still struggling to stop my self hosted, embedded videos using the media element from the avia page builder from looping. Could you please provide me with a step by step guide on how to prevent videos from looping?
Why is it so complicated?Thank you very much,
MagnusMay 30, 2020 at 11:37 pm #1218090Hi,
It seems the login above is not working, please check. Which page are you testing on, the only video I could find was on the home page and was from Vimeo.Best regards,
MikeMay 31, 2020 at 12:37 am #1218094Hi Mike,
sorry. Meanwhile I changed the permalink of the article. I posted again the login details into the private content of this post.
Many thanks,
MagnusMay 31, 2020 at 1:09 am #1218101May 31, 2020 at 1:20 am #1218103Sorry. My fault. Please see private content again.
Thank you so much for further assistance!
May 31, 2020 at 12:32 pm #1218169Hi,
Thanks for the login, I was hoping to check your child theme structure and modified files, but your WordPress > Appearance > Editor is disabled, probably in yourwp-config.php
there is this codedefine('DISALLOW_FILE_EDIT',true);
if you are able to restore the theme editor or if you include FTP access we will be able to investigate further.Best regards,
MikeJune 2, 2020 at 10:37 am #1218722Hello Mike,
thank you for your further support. As I am somehow unexperienced with child-themes and changing the code of wordpress files, please find the FTP login credentials in the private content.Thank you very much for futher held.
Best regards,
MagnusJune 2, 2020 at 12:54 pm #1218762Hi,
Thank you for the FTP access, I changed thedefine('DISALLOW_FILE_EDIT',true);
todefine('DISALLOW_FILE_EDIT',false);
in yourwp-config.php
so the WordPress > Appearance > Editor would show. I found your child themesection.php
was empty, I added the correct code, but then realized that the video you were pointing to was in a video element so I copied the Video directory from Enfold shortcodes to your child theme an then invideo.php
changed line 347 from:$video_html_raw = avia_html5_video_embed( $src, $fallback_img );
to:$types = array('webm' => 'type="video/webm"', 'mp4' => 'type="video/mp4"', 'ogv' => 'type="video/ogg"'); $attributes = array('autoplay' => 0, 'loop' => 0, 'preload' => '' ); $video_html_raw = avia_html5_video_embed($src, $fallback_img, $types, $attributes);
and now your video only plays once. Please clear your browser cache and check.
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.