Videor ger liv åt din webbplats och är ett utmärkt sätt att öka användarnas engagemang.
Lyckligtvis gör WordPress det superenkelt att bädda in videor från videohostingsidor som YouTube, Vimeo, Facebook, Twitter och många andra.
I den här guiden för nybörjare visar vi hur du enkelt embedar videoklipp i WordPress blogginlägg, pages och widgets i sidebar.
Varför embedda videoklipp i dina blogginlägg i WordPress?
Att lägga till videoklipp på din WordPress blogg är ett bra sätt att genomföra dina besökares uppmärksamhet och öka engagemang och konvertering.
Videor bidrar till att öka den tid som användarna tillbringar på din WordPress-webbplats, och vissa besökare kanske till och med föredrar att titta på en video snarare än att läsa skriven text.
Här på WPBeginner embedar vi videor i våra mest populära WordPress tutorials.
Ska du ladda upp videoklipp direkt till WordPress?
Jo, det kan du, men vi rekommenderar inte att du gör det.
De flesta små bloggar använder delade WordPress webbhotell konton, och videoklipp kan ta upp mycket resurser på servern. Om ditt videoklipp får mycket trafik är det mer troligt att din website kraschar.
För det andra går du miste om trafik från användare av YouTube och andra webbplatser för webbhotell.
YouTube är inte ej endast det största webbhotellet för videoklipp, det är även världens näst mest populära search engine och det näst mest populära sociala nätverket efter Facebook.
Om du inte vill uppladdare dina videoklipp till YouTube, kan du använda andra plattformar som Vimeo, Jetpack Video, Wistia, och mer.
För mer detaljer, se vår post om varför du aldrig ska uppladare ett videoklipp till ditt WordPress mediabibliotek.
Med detta sagt, låt oss visa dig hur du kan embedda videoklipp i WordPress blogginlägg, steg för steg. Använd bara snabblänkarna under för att hoppa direkt till den metod du vill använda:
Om du föredrar skriftliga instruktioner är det bara att fortsätta läsa.
Metod 1: Embedda videoklipp i WordPress blogginlägg och sidor med Block Editor
WordPress har en utvald funktion som kallas auto-embeds, som allow your website att automatiskt hämta embed-koden från populära webbhotell för videoklipp som YouTube, Vimeo etc.
Allt du behöver göra är att klistra in URL:en till videoklippet i WordPress Editor.
Du kan till exempel kopiera URL:en till YouTube för ett videoklipp som du vill embeda.
Därefter redigerar du WordPress inlägget eller sidan där du vill add to videoklippet och klistrar in URL:en i content area.
Så snart du klistrar in videons URL kommer WordPress att hämta embed-koden och visa YouTube-videon i content editor.
You can now save your post by clicking the ’Update’ or ’Publicera’ button to see the embed video in your live post.
Var inte det lätt?
När du har lagt till videon kan du customize dess inställningar genom att clicka på videoklippet i Editorn och göra ändringar i toolbaren i popup-fönstret.
You can adjust the video width, change the alignment, and more. Du kan också lägga till en caption och bevara videoklippets bildförhållande på mobila enheter.
WordPress kan bara göra auto-embeds för vitlistade tjänster för videoklipp. För andra webbplatser måste du fortfarande hämta embed-koden och sedan klistra in den i dina blogginlägg.
Här är en lista över vitlistade tjänster för videoklipp för automatisk embed i WordPress:
- Amazonas
- Animoto
- Cloudup
- CollegeHumor
- Crowdsignal
- Dailymotion
- Flickr
- Hulu
- Imgur
- Utgåva
- Kickstarter
- Meetup.com
- Mixcloud
- ReverbNation
- Screencast
- Scribd
- Slideshare
- SmugMug
- Några kort
- SoundCloud
- Högtalardäck
- Spotify
- TED
- Tumblr
- VideoPress
- Vimeo
- WordPress.tv
- YouTube
Om du vill add to ett videoklipp från en website utanför denna lista, behöver du den fullständiga HTML embed-koden för videoklippet.
Kopiera bara HTML-koden som tillhandahålls av videoklippets website och klistra in den i ”HTML”-blocket i Editor.
Mer information finns i vår guide för nybörjare om hur du redigerar HTML i WordPress code editor.
Metod 2: Embedda videoklipp i WordPress med hjälp av den gamla klassiska Editorn
Om du fortfarande använder den gamla klassiska WordPress Editor kan du bädda in videoklippen på samma sätt.
Kopiera helt enkelt webbadressen från en videohostingtjänst som YouTube och klistra in den i redigeraren. Om du använder den visuella redigeraren kommer du att se en förhandsgranskning av videon.
Du kommer dock ej att kunna använda breddjusteringen och andra alternativ som du kan använda i WordPress Gutenberg block editor.
Se till att du klickar på knappen ”Update” eller ”Publicera” för att dina ändringar ska börja gälla.
Metod 3: Hur man bäddar in videoklipp i WordPress Sidebar Widgets
Likes a WordPress post or page, you can also embed videos in WordPress sidebar widgets.
Gå bara till Appearance ” Widgets i din WordPress admin area och klicka sedan på ’+’ add new block icon.
Därefter söker du efter ”Video” i sökfältet.
Sedan kan du klicka på blocket för den typ av videoklipp du vill lägga till. Till exempel YouTube, Vimeo, TED och mer.
Därefter måste du klistra in din videoklipps URL i boxen, klicka på knappen ”Embed” och den kommer automatiskt att läggas till i widgetens area.
Sedan är allt du behöver göra att klicka på knappen ”Update”, och videoklippet widget kommer nu att vara live på din WordPress site.
Nu kan du besöka din website för att se videoklippet Live. Storleken på videoklippet kommer automatiskt att skalas baserat på storleken på ditt widgetar area.
Mer information finns i vår guide om hur du lägger till och använder widgetar i WordPress.
Metod 4: Använda tillägg för videoinbäddning i WordPress för att bädda in videoklipp
Som standard behöver du inte använda ett plugin för att embedda videoklipp i WordPress. Du kanske dock vill använda tillägg för att förbättra upplevelsen av videovisningen på din website.
Följer några tillägg till WordPress som du kanske vill prova.
1. Smash Balloon YouTube Feed Pro
Smash Balloon YouTube Feed Pro är det bästa tillägget för YouTube video gallery för WordPress, betrodd av över 40 000+ webbplatsägare.
Vi har använt den på våra egna webbplatser och testat alla dess funktioner. För detaljer, se vår fullständiga Smash Balloon-recension.
It allows you to automatically embed all of your YouTube channel videos in a customizable gallery format. Det importerar automatiskt nya videoklipp, kombinerar feeds, kan lägga till live streaming-funktionalitet, embed en YouTube playlist och mer.
Dessutom inkluderar det visningar, likes, delningar, kommentarer och reaktioner, vilket kan bidra till att öka ditt sociala bevis.
Det finns en gratis version av YouTube feed plugin available som du kan använda för att helt enkelt add to din YouTube-kanal feed till WordPress.
För mer information, se vår guide om hur du visar de senaste videoklippen från YouTube-kanalen i WordPress.
Du kan också använda Smash Balloon YouTube Feed-plugin med Social Wall-plugin som kombinerar allt ditt sociala medieinnehåll från Facebook, Instagram, Twitter och YouTube på en enda WordPress-sida.
2. Smash Balloon TikTok Feeds Pro
TikTok Feeds Pro, också av Smash Balloon, är ett kraftfullt plugin som allow you att enkelt embed TikTok videos var som helst på din WordPress site.
När du postar på din TikTok-kanal matas den automatiskt till din website och visas i ett beautiful video gallery feed. You can choose from multiple feed layouts, including grid, carousel, list, and masonry.
Drag-och-släpp-flödesredigeraren ger dig också fullständig kontroll över utseendet på ditt TikTok-flöde. Du kan ställa in antalet videor som ska visas och anpassa färger, styling, avstånd och mer.
Dessutom kommer det med användbara moderationsverktyg för att filtrera dina videoklipp baserat på ett ord eller en hashtag. Med hjälp av den här funktionen kan du skapa curate video feeds för olika delar av din website för att rikta in dig på specifikt content.
Det finns också en gratis version av Feeds for TikTok plugin som du kan använda för att add to en enkel TikTok feed i WordPress.
Se vår guide om hur du embedar TikTok videoklipp i WordPress för mer detaljer.
3. Envira Gallery
Envira Gallery är det bästa galleripluginet för WordPress på marknaden. Vi har använt det på några av våra webbplatser för att skapa vackra WordPress-gallerier. För mer information, se vår recension av Envira Gallery.
Du kan använda det för att enkelt skapa fotogallerier i WordPress. Den levereras också med en Videos Addon för att visa vackra och responsiva videogallerier.
Du kan skapa gallerier med videoklipp från YouTube, Vimeo, Twitch, DailyMotion med mera. Du kan även displayed YouTube playlists från your personal account och du har möjlighet att starta YouTube videoklipp vid en viss timestamp.
Envira är superenkelt att använda. Ange bara webbadressen till din YouTube-video, så hämtar det smarta systemet automatiskt videominiatyrerna åt dig.
Det finns en gratis version av Envira Gallery available. Du behöver dock premium pluginet för att få tillgång till funktionen för videoklipp gallerier.
4. Fält för YouTube-prenumeration
YouTube Subscribe Bar visar en knapp för YouTube-prenumeration under dina YouTube videoklipp som är embedade i WordPress. Den hämtar också antalet YouTube-prenumeranter för att add to sociala bevis och uppmuntra fler användare att prenumerera på din kanal.
Vi skapade det först för att främja WPBeginners YouTube-kanal på denna website. Många av våra användare bad oss att dela med oss av hur vi gjorde detta, så vi bestämde oss för att släppa det som ett gratis plugin.
5. Lazy loaded för videoklipp
Lazy Loaded for Videos löser problemet med att ladda inbäddade skript för videoklipp från externa webbplatser, vilket påverkar sidans laddningshastighet och prestanda.
Istället hämtar den bara embed-koden när användaren klickar på play-knappen.
Förresten, du behöver inte detta plugin om du använder Smash Balloon YouTube Feed plugin eftersom det har built-in caching och fördröjd hämning för videospelaren.
Video Tutorial
Vi hoppas att den här artikeln hjälpte dig att lära dig hur du enkelt bäddar in videor i WordPress-blogginlägg. Du kanske också vill se vår guide om hur du ställer in video-SEO i WordPress eller vårt expertval av de bästa programvarorna för videoredigering.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Jiří Vaněk
Thanks for the block editor tutorial. I’ve been using Elementor until now and here’s a widget where you just put the URL of the video and it worked. But it’s good to know how it works in the block editor in case the website owner doesn’t want Elementor for some reason.
Pierre Gazzola
As my dementia stay the same I though I try again wordpress been away siince version 3.
However was smart enough to keep your page in my wp tab on chrome you help me so much all the time and remembering so much thank you.
From a old 70 25 at hearth :))
WPBeginner Support
Glad we can be helpful and we hope our guides continue to help you now and in the future!
Administratör
sandeep
i have added YouTube video links in my WordPress blog post. now I want to remove that video link
so my question is after removing that links does it create any problem in that post indexing in google search console. because that video is appearing in video indexing page of google search console
WPBeginner Support
Unless we hear otherwise, removing a video link should not cause an issue with your post indexing.
Administratör
Krystal
When I upload a video using the blocks wordpress tells me I must upgrade my account for $96/year. I’ve been using wordpress since 2012. What gives?
WPBeginner Support
If you’re being told to upgrade, you are using WordPress.com and running into a limitation. Our content is for WordPress.org. You can see the differences between the two in our article below:
https://www.wpbeginner.com/beginners-guide/self-hosted-wordpress-org-vs-free-wordpress-com-infograph/
Administratör
Barry C Laminack
Hi, In case others may have the same problem I did with embedding a video from Rumble, after many trying many different things, I figured out how to do it by accident lol.
If it is your own video, use the Embed Code but only the link within the src= portion.
If it is not your video, using the ”EMBED” button of the video, copy and use the ”Embed IFRAME URL” link provided in the Embed pop dialog.
WPBeginner Support
Thanks for sharing that for users using that service
Administratör
Dexter Rodrigues
Super stuff guys. I was struggling for 2 days with LearnDash LMS on WP and a premium European hosting provider. I used the method of Custom HTML embed and it worked just fine. It’s 3.00am in the morning where I am at and am smiling because of you :). Thanks a lot, this content is truly for a beginner like me with an erratic learning curve.
WPBeginner Support
Glad our guide was helpful
Administratör
Imtiaz
I tried to upload videos from youtube, but it shows all related videos. I tried to put some restrictions also with functions like control=0, autoplay=1, ?rel=0, but none of these worked. I tried to upload videos from vimeo also, but there also related videos displayed.
Than I tired to upload videos directly from my pc, but that made my site slow.
Any suggestions how to use embeded vdeos of html from my pc.
WPBeginner Support
We do not have a recommended method for embedding a video from your home computer as a server at the moment.
Administratör
monika
hi can i add food youtube videos on my wordpress food theme?……..i am serching for a food theme on wordpress that supports food videos.
thanks
WPBeginner Support
You can add videos to any WordPress theme, where you add it would determine how difficult it would be to achieve.
Administratör
tuna
Thanks for the nice information…
I have a problem with url embed function in wordpress. When I add a url to embed a different post from my website ,everhting seems fine in preview mode. I mean I am seeing thumbnail and a excerpt of the post which is exactly what I want. But, when ı update the post there is only a simple link instead what is shown in preview mode. I need your help if possible.
Best Regards
WPBeginner Support
You would want to start by following our troubleshooting guide below:
https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Administratör
Samuel
I would like to have a website that is purely a Video Gallery but more like YouTube.
Do you think Plugins can do that?
Can you recommend some Plugins for me?
Thank you,
WPBeginner Support
That type of site would require more than only plugins, we would first recommend taking a look at our article below:
https://www.wpbeginner.com/beginners-guide/why-you-should-never-upload-a-video-to-wordpress/
Administratör
Gaurav J
Hi. i am using embeds block to embed my YouTube video into the post. In the edit post window, I can see the video is getting embedded/I can see the preview of the video. But, once i publish the post or preview it, I could only see the link of the video and not the preview.
I am not using any plugins for embedding the videos.
Could you please help?
WPBeginner Support
You would want to start by ensuring you’re using the YouTube block. If you are then you may want to go through the troubleshooting steps in our article below:
https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Administratör
Liz
Hello,
i used to embed video on wordpress by simply past the link.
Now, Google search console detect that there are some problems in the two pages I have with video embed.
I’m talking about mobile usability.
Is there a way to fix this problem or a plugin that will fix it ?
WPBeginner Support
It would depend on how and where you added the videos from, using the YouTube embed as an example should not cause an issue unless you’re using an iframe embed that specifies width.
Administratör
Luz Manalo-Cruz
I am unable to embed a YouTube video using the embed block editor (I tried both the embed block and the Youtube block). I’ve already tried pasting from the youtube studio link, from the URL in the address bar, and from the ”share” button. Is there something I’m not doing right?
WPBeginner Support
You may want to try disabling your plugins to ensure this isn’t a possible conflict between one of your plugins and the embed.
Administratör
JOy Halverson
I have a youtube video on my Wordpress ecommerce site – when the video ends I simply want it to end so that my customers aren’t curious to go see other videos. No ”ads” for other youtube videos unrelated to my site- I seem to recall that there is some code you can put at the end of the video URL that will accomplish this. thanks
WPBeginner Support
YouTube does not offer that functionality at this time.
Administratör
Naomi
Thank you for the information. May God bless you!
WPBeginner Support
You’re welcome, glad you like our content
Administratör
HJK
Hi, I’ve used the embed code in the HTML editor then when I switch back to visual it appears, however when I try to preview the post the video does not show up at all.
WPBeginner Support
If it is only when trying to preview the post, you may want to try saving your draft beforehand to ensure that it is not due to the preview not being saved properly
Administratör
Arpit
Really useful information. Can you please help me to know, if i add video on Wordpress post will effect on site speed or particular post speed.
WPBeginner Support
For our opinion on that, you would want to take a look at our article here: https://www.wpbeginner.com/beginners-guide/why-you-should-never-upload-a-video-to-wordpress/
Administratör
Jason
”ll you need to do is paste the video URL into the WordPress editor.”
What a ie. Even putting the youtube link into the embed block doesn’t work. I wish Wordpress would stop giving incorrect directions. Nothing seems to work when it comes to putting a simple short youtube link (of my own 2 minute video into wordpress. WP? …. IDK about this.
WPBeginner Support
You may have a plugin or similar that could be preventing the embed from being added correctly, have you tried using the video block that was added with the Gutenberg/block editor?
Administratör
Jeffrey Christian
I’m trying to embed a link from Vimeo but come up with the following error:
Sorry, this content could not be embedded.
There is no issue with the video, so not sure why there’s an error.
Any suggestions would be appreciated!
WPBeginner Support
If this method didn’t work, have you tried the video block to embed using that? If the error is in a Vimeo embed then the video owner may not allow embedding of the video.
Administratör
Suzanne Dunaway
I cannot get this to work at ALL and I have a blog with 10,000 followers so far. Why won’t this work on my Wordpress editing page??????
WPBeginner Support
If you’re using the new block editor then there is an embed or a video block that you can use if that is the issue.
Administratör
Gordana
I tried to embed url from yotube, it does work but copied video seems too large. I wanted smaller feature and I couldn’t get it smaller in no possible way. I tried same from Vimeo and was satisfied with the size. Do you have any similar experiences?
Ashley
I am pasting in the URL for our YouTube video and it does not auto embed. I did this exact process twice yesterday with no problems. Tried the embed code, logged out and logged back in but it still won’t auto embed.
Any ideas as to why this has suddenly stopped working?
David
Well what do you do when you you insert the URL, the image auto generates and then clips the rest of the paragraph instead of adjusting to fit?
Muhammad Junaid
I am using elementor to add youtube video.Secondly,does it violate copyright rule?
Civali
Please, how to set autoplay and sound off in video url?
Tyoaan Calistus
When I embed a YouTube code and add on my post, the button on click on and watch the video is usually not in the middle of the post.. How do I fix that pls?
Sejal
Hi..I copied the Youtube URL and it shows properly on the desktop version but doesnt show anything in the mobile version? Am I doing something wrong?
Suzanne Eutsler
I am embedding facebook live videos into our ministry website and am trying to figure out spacing issues. If you look at the link below, you’ll notice that underneath the video some of the text is cut off and when you look at it on an iphone you’ll notice there’s a TON of white space after each video.
HOW do I set it to be automatic that it just fits? Is there a way? I’d like it to show up correctly regardless of the pc or iphone or android etc.
HELP!!!! Please
WPBeginner Support
Hi Suzanne,
You will have to use Inspect Tool to find out CSS causing extra white space and adjust it by adding custom css.
Administratör
Isaac
pls how can i post non-youtube videos on my wordpress page
Erin
Do I have to have WordPress premium to be able to do this?
Tom Minkler
What if a video is shared to Facebook from Instagram, THEN i try to put it in Wordpress post? For awhile, pasting the FB link into the visual editor was working fine, but now it just shows the link.
I don’t think those past videos that work were from Instagram, i went back and looked and one was shared from one Facebook page to another but the original doesn’t say it is from Instagram. Does it matter?
Thanks for your help.
Judy Mitchell
Perfect – thanks!
Alexander
thank you very much wpbeginner for this awsome post as usual it was so usefull
and i have another question my worpress site does not display properly on smartphones and android device what could be the problem ?
Riyaz Khan
Hi,
I want to develop a site where i am allowing users to upload the videos in their profile dynamically and same can be seen by other member, kind of facebook.
Is there any plugins for the same?
Kim
Hi WP Beginner!
First off my wordpress is a localhost. I’ve uploaded the video by adding media. (It shows up in my media library) However, when I put it in a post it starts by looking like it will play then goes black as says:
Media error: Format(s) not supported or source(s) not found
Then it gives a download link.
Is there anyway to just embed the video without giving a download link?
The video is an mp4.
Any help would be great! Thanks!
WPBeginner Support
Hi Kim,
Test your video in different browsers if it still shows error then your video file may not be encoded properly.
Administratör
Hedi Putra
How to embed video on worpdress without iframe? can I use div code to embed?
Zeeshan Zafar
I have added Youtube Link in my site post but unfortunately it is not showing. I have tried many things to make it visible but no success. On load iframe load but there is nothing in the body tag of iframe.
Please Help….
JEG
I think in 4.9 you may need to add the link to the media library and then paste it from there
JEG
Sorry this is not correct. Instead I suggest you delete your post and create a new one. I was having a similar problem and that is how I fixed it.
Jennifer
I was able to embed my video from facebook live, and everything appears to be working perfectly EXCEPT there is no audio. What can I do?
Milliana
So how then do we use the embed code for ARCHIVE.ORG
WP will not let me use the Internet Archive iframe any more since it has updated.
This is a problem!
Do you have a work-around?
Thien Tam
I am using WP 4.9. and it is ok to embed audio and video from archive.org. just put the file between embed code. Like this: your video or audio link here
WPBeginner Support
Hi Thien,
Yes, it is ok to embed audio and video from archive.org.
Administratör
Alex
This does not work in the category text. Is it possible also here?
ILIA
Hello! Is there a way to upload a Boomerang from my iPhone to a post on my WP blog?
Mac
Hello, I’m trying to include a video on my Wordpress post. I copy the URL (URL only, not the embed code) from my Vimeo link and paste it onto the Post Editor on its own line. It is not a hyperlink. After saving & updating the post, I go to look at the post and all I see is the text of the Vimeo url (no video). What am I doing wrong? FYI this is my own video on Vimeo; there are no privacy settings and it can be shared. Thanks.
WPBeginner Support
Hi Mac,
Try switching to a default theme and disable all plugins, see if this resolves your issue. You can also try this shortcode
1-click Use in WordPress
Administratör
Vivek Darji
hello wpbegginer
how to increase Traffic on Photography site? without any content because my friend start a photography blog he was update only photos in blog how to improve that blog?
Guust
Just a note to anybody thinking of just adding videos to explain things rather than explaining with written words.
Videos with spoken explanations only are not accessible to hearing impaired people and might also be difficult for visitors to your site who do not speak the same language as the language used in the video.
And videos cannot be read by screen readers for the bling.
So make sure to add subtitles and also provide screen reader accessible content if you want or need your site to be accessible.
Cheers
Michelle
Hello,
I’ve just embed a youtube video on my wordpress site and it plays from that webpage on a desktop/leptop. However, when I access the webpage from my mobile device, when I play the video it opens it up in the Youtube app instead of staying on my website. I don’t want viewers to leave the webpage I’ve embed the video on while on mobile devices. Is there anyway to ensure viewers will not leave my site while on a mobile device and watching my video?
Hassin
is it possible that I could upload a video on my homepage. this is my wordpress blog
I want to change the video that is on the bottom of my page but I can’t change it, please help me. It is entered through Videopress
Paul Holmes
Hi Kathy,
I’m having problems with Vimeo embed codes. I have copied and pasted the Vimeo embed code onto my WEBSITE on the WORD PRESS Page but, when i click update and view changes all I see is the VIMEO Embed Code and not the VIDEO.
It isn’t showing the Video on my WORD PRESS Page just the EMBED CODE?
Look forward to your reply THAK YOU
Regards
Paul
WPBeginner Support
You can add a Vimeo video by simply entering the URL of the video page. No need to add embed code.
Administratör
Kathy
I am having great difficulty getting a video to post on my WordPress blog. I’ve loaded it up to my youtube channel and then copy the URL from there. I paste into my NewPost, taking care to not have anything else on that same line. The video pops up in the edit box, but will not show on my blog when I come in from the outside, like any of you would do.
I’ve reviewed bunches of training sites that all say I am doing this correctly, and yet it won’t show. I called GoDaddy, since they are my blog host, but to no avail. They couldn’t help.
I even tried using the embed code and got the same results.
Does anyone have any suggestions?
Jeanne
Thank you for this video. Seems simple enough, but the video I want to embed in my Word Press template is from a news station’s website. It’s not on the white list and although you said we would have to use the embed code instead, you did not provide a link to how to use the embed code.
Cory
This was helpful, but I’m an idiot and need every single step spelled out for me…haha! What may be helpful for others looking for the solution, is more details on the link that you actually use on the wordpress page. It’s shown in the video but isn’t specifically explained. Don’t use the links that youtube gives you in the ”share” option. Instead, copy and paste the actual url that is in your address bar of your browser.
Erin Tallman
Agreed. I’m looking for more advanced options, so this actually wasn’t very helpful