Learn a little website code with me: Auto-update your latest YouTube video


Hang in there with me, ok friends?

We're going to do a little coding today!


Why go through the trouble?

Well, maybe you're in this situation:

You have an embedded YouTube video on your site that you update to display the most recent sermon. But, life happens - sometimes you forget to update the link. Sometimes your Easter service is still up in October.

OR, perhaps you're good at remembering to update the link, but you'd like to save 5 minutes every week.

Let's pop a little code in that embed link that will automatically display your most recent video.

We can do this! 🎉

STEP 1: Go to your YouTube channel. This is your main homepage on YouTube.com. Example: YouTube.com/StJohnsMinneapolis

STEP 2: Right click anywhere on the page and click View Page Source.

STEP 3: In the top left corner, check ✔️ the box next to Line Wrap.

STEP 4: Press CONTROL and the letter F on your keyboard at the same time. (COMMAND if you're on a Mac) A little search box should pop up. This will allow us to search for something specific in this mess of code.

STEP 5: In this box, type channel_ID. Hit enter to search around the document until you see something like this: (a long string of letters that starts with an uppercase UC)

STEP 6: Select and copy all of those letters - between the = and "

(Highlighted in yellow above)

STEP 7: Take your channel ID (the letters you just copied) and place it in this chunk of code (where the yellow words are). Then, follow the IMPORTANT step below.

<iframe src="https://www.youtube.com/embed?listType=playlist&list=CHANNEL ID HERE"></iframe>

IMPORTANT: Replace the UC at the beginning of your channel ID with UU.

Don't ask me why - I do not know. Computers are weird.

STEP 8: (This step will be different for everyone - since we all use different web platforms. Email me or your webmaster if you need help.)

Go to the backend of your website and find where your current YouTube video is embedded or where you'd like to insert the new display.

Instead of your current YouTube embed, insert a custom code block. On SquareSpace, you would click Add a block, then Code. This page element exists on most major web builders. Look for a widget or page element that allows you to paste in HTML code.

Paste in the code from STEP 7.

Save & Voila!


View the page on your live website and see if it's displaying well. If not, we may need to add a little CSS (styling) to make it look nice and neat. Use this page for a really good guide on how to do that.

Well, did we make it through? Please reach out and let me know how it went! Happy to help if you run into any bumps in the road.

Until next week...

Grace Ungemach

I offer digital marketing education written with ministry in mind. Subscribe to my free, weekly newsletter to learn something new every Friday.

Read more from Grace Ungemach

I love Canva and I feel no shame about that fact. The professional graphic design community loves to make fun of Canva users. I, on the other hand, think Canva is a great tool: an accessible alternative to expensive softwares. If everyone could be a pro at Adobe Illustrator, that would be great! But that's just not reality. As someone who is fairly comfortable with both ends of the software spectrum, I want to teach you a few ways to level up your Canva usage. 1) Instead of the "Lift" text...

Are you making the most of Facebook Events? If you're putting on any sort of outreach event in the coming weeks, I'd encourage you to take a few minutes to set up a Facebook Event. Then, use the list below to spread the word! You might be surprised how much visibility you can gain for free (or just a few dollars). Rule #0: Make absolutely certain that you include a location in your event wherever you can. If you do, you'll automatically be added to the list of events for your city/town, which...

Here are 3 ideas for the header of your Facebook page: This is valuable real estate! Everyone who visits your page sees this first. What kind of impression do you want to make? Here are 3 ideas in order of least to most effort: 1) A candid photo of your community I've said it once, I'll say it again: You cannot go wrong with happy, smiling faces! Ideally, this is candid, not posed. 2) Your logo with text Another option is your logo with some simple text underneath. The background can be a...