The way WordPress handles Youtube embeds is awesome - just copy-and-paste the link into the editor. Unfortunately, when echoing custom fields in a theme, it isn't that easy. Thanks to Convoy for this fix:_e( wp_oembed_get( get_field( 'youtube_link' ) ) );
NOTE: My example, uses Advanced Custom Fields' "get_field" function. You could replace get_field( 'youtube_link' ) with get_post_meta().
More posts from themightymo.com
use a plugin to do a bunch of optimizations on this site, but for some reason, the preloading of fonts is broken. So I rolled my own font preloading function and placed it in my functional plugin (You could also put it in functions.php). Here’s the code.
Beaver Builder doesn’t give you an interface to change the background color of the sticky menu after scrolling. Here’s a simple bit of CSS that can help.
Today I decided to invest 1 hour optimizing themightymo.com. Below are the actions I took along with the results. Speed Benchmarks and Initial Observations Before starting on today’s speed optimization, Google Pagespeed Insights scored us as a “44”. There’s some files loading from the wp.com cdn (e.g. Jetpack’s cdn) – Google is penalizing me for…