loaging    LOADING.....
歡迎來到BeClass線上報名系統 !
免費、快速、簡單,輕鬆製作線上報名系統!
站內搜尋 承辦人員登入  · 註冊
最新活動 · 熱門活動 · 地圖搜尋 · 報名表範例 · 系統問題 · 功能說明

WordPress autoplay and loop YouTube videos

loop you:2022-11-01

活動說明

Videos are a simple and effective way to swiftly share information with your audience. The presence of a video on your website will increase user engagement and extend the time they spend on it and thinking about your business.

There are numerous approaches to working with videos. While you could directly upload a movie to your WordPress installation, we do not advise it. Video loading uses more server resources than other content formats do. The process will probably overburden your web hosting server, which will have a detrimental effect on the speed and functionality of your website.

Typically, YouTube embeds don't start playing until a button is clicked. A new video or a list of suggested videos will begin at the conclusion. Although many websites use this default setting, you might prefer that your website display videos in a different way .

You can watch the video below for the TLDR or continue reading for instructions on how to autoplay and loop YouTube videos in WordPress.

The first thought that comes to mind could be to look for a plugin to help with this procedure. Autoplay And Loop YouTube Videos In WordPress. A couple plugins purport to provide this capability, but throughout our testing they did not perform as promised. Fortunately, a simple modification to the YouTube-provided embed code will allow you to alter how videos appear on your website.

How To Safely Test WordPress Changes


Don't freak out if you're worried that you'll screw up the entire page. You may take a few steps to prevent your labor from going to waste.


Then, copy all the code and paste it into a new page in your WordPress installation by selecting the Text tab in the editor. Now that you have a copy of the page nearby, you can start over if necessary.

Using a WordPress backup plugin, now might be a good time to take a backup of your entire website. Although backups are sometimes included with WordPress hosting packages, it's highly advised that you maintain a local copy of your website in case of unforeseen data loss.

We advise using Cloud WordPress if you are making more involved modifications to your website. For unrestricted experimentation, Cloud WordPress offers free WordPress demos in a sandbox environment. You may quickly start again if you mistakenly break a website by deleting it.


Read more: How to Play YouTube Video Loop on Mac and PC in 2022


Step-by-step Guidelines


It's time to obtain the genuine WordPress code for the autoplay and looping of YouTube videos.

Get the YouTube embed code

  • launch YouTube and look for your video.
  • To share the video, click the Share icon.
  • To embed a popup, click it.
  • Using the button at the bottom of the panel, copy the code from the following screen.

WordPress Embed Code Add-On

Open the page where you want to add the video in your WordPress dashboard. The Text tab must be used to add the code snippet.

Finding the correct spot in the code after you're in the Text view can be challenging. It's good to highlight some text close to the location of the video before switching. To help you know where you are after selecting the Text tab, that text will remain highlighted.

You should put the code you copied from YouTube into the column where you want the video to appear. Look for code identical to what is displayed below since your website layout will change unexpectedly if any code is unintentionally placed outside a column.


Read more: Bringing loop video youtube Feature on Smartphones


Change the embed code

Now that we have modified the initial code, WordPress can automatically play and loop YouTube videos. The src link is the section we'll modify. To be more precise, we'll add code that will instruct YouTube on how to present our video in more detail.

Be remember to substitute your video ID for ours as you work with this example code. The random letters and digits found in the link immediately following /embed/ are the video ID. The video ID in this instance is xp s4zekfz4.

The example below has the new code applied, while the snippet above displays the src YouTube provides us with as a starting point. Just be careful to swap out your video ID in both places where ours appears for yours. The distinction is? At the conclusion, autoplay=1&playlist=xp s4zekfz4&loop=1 was added.

Next, confirm that the allow="autoplay;" line is present in the iframe code section. If you don't see it, please put it right away inside the iframe even though it ought to be there from the original YouTube code.

The finished code will be displayed in the video below so you can compare.


Read more: How to Loop YouTube Video on a Computer or Mobile Device

more events
近期熱門活動...
© 2023 - 關於BeClass |  隱私權保護暨服務及聲明條款 |  聯絡我們  |  手機模式