Introduction
Nowadays, with the development of the Internet, the requirement to watch videos on the Internet has increased. Youtube – one of the most popular platforms – provides viewers with millions of videos every day. Therefore, if you are owning a Joomla website and want to attract more visitors, why don’t you display many interesting Youtube videos on your site? In the blog today, we would like to bring you 2 ways to help you add Youtube Video to Joomla 4. So, let’s take a look now!
The two methods to Add Youtube Video to Joomla 4
Using an extension to add Youtube Video to Joomla 4
There are a lot of Joomla extensions to support you to add and showcase Youtube videos on your site, but we would like to guide you to use Youtube – Advanced Custom Fields to do that. Don’t worry because it is easy and simple to use.
First of all, you need to download and install the extension to your Joomla 4 site. After that, you need to create a new field in the Content section. So, simply go to Content -> Fields -> New.
Now, let’s fill out the title, then select ACF – YouTube in the Type option. Besides that, in the Video Size, there will be 2 options:
- Fixed: If you choose this option, you can customize the video width and height as you want.
- Responsive: This option will allow you to embed the videos that adapt to all sizes of the screen.
Don’t forget to save all your settings.
In the next step, simply go to the Youtube website, then search for the video you want to add. After that, all you need to do is copy the URL of the video.
Now, let’s go back to the Joomla admin dashboard, access Content -> Articles. Then, you just need to select the article you need to display the video or generate a new article to add.
In the Fields section, simply paste the Youtube URL you copied before into the Youtube option.
Finally, you just need to save or publish the article.
It’s time for you to check the result on your site. You will see that the Youtube video appears in the article you edit before.
Embedding a Youtube video to Joomla 4 manually
If you don’t want to use an extension to embed the Youtube videos, you can do that manually.
Now, let’s go to the Youtube website and choose the video you like. After that, simply click on the Share button under the video. A Share popup will appear for you to select the options. Thus, you just need to select the Embed option.
There will be an HTML code for you to use. Let’s copy the code.
Next, in order to add the HTML code and make it work, you need to switch the editor to CodeMirror.
After that, go to Content -> Articles, generate a new article or select the current one to edit. In the Article text box, let’s paste the HTML code you copied on the Youtube website. You can add it anywhere you want to the article without any trouble. In addition, you can change the video width and height by altering the number you want.
Finally, don’t forget to save/publish the article to store all your settings.
Now, why don’t you visit your site to see the result?
Wrap Up
In conclusion, adding Youtube videos to your site play a vital role in engaging more visitors for your site. Therefore, if you are looking for some ways to do that, the blog today is suitable for you. With the instruction in the blog, we hope that you can add Youtube video and display it on your site successfully. If you have any queries, let’s leave your comment below so that we can quickly help you. Last but not least, don’t miss a lot of responsive and eye-catching Joomla 4 Templates here.
- How to fix Joomla not respecting shared sessions toggle? - October 16, 2024
- How to Properly Move WordPress From Subdomain to Root Domain - October 10, 2024
- What is: Administrator - October 8, 2024
obviously, I have missed something in this article. It is much much simpler to copy the embed code than to use the suggested advanced fields extension. I don’t see anything about the results of the two methods that would justify getting involved with the extension. So, given that
* the extension may or may not break over time due to new versions of Joomla or changes in youtube
* there final displayed result is the same either way
Why bother with the extension??
Thank you for your feedback! Yes, most of case we can embed code via Custom HTML, it’s high recommend way. But you must config Editor to accept ‘iframe’ code.