Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Ben Taylor
Ben Taylor
902 Points

How to make videos automatically go into a specific div on Wordpress

Hi guys,

So I've found a nice bit of CSS, that makes videos responsive.. however everytime I post a video, I need to put the video code within a "videocontainer" div.. Which is fine.. But what about clients of mine who don't know HTML? Is there a way to make video embeds automatically be put into a "videocontainer" div when posted on a wordpress post/page?

Many thanks!


1 Answer

Brian MacDonald
Brian MacDonald
4,951 Points

The simple answer to your question would be a custom wordpress theme for your clients with programming knowledge.

Instead of using a generic prebuilt theme, you can either create a brand new one for scratch or harvest an existing one to make it customized to your needs. If you have not checked out Treehouse's section on wordpress, this could give you much more info!

Custom post types and custom fields plugins would in turn allow you to take your new custom theme, have many options for templates and use the custom fields/post types to place items however the client would like to, easily across the page!