Define embedded media width
This is being used with custom post types to determine embedded media width, such as videos or iframes. Non-responsive. Add to functions.php
1 2 3 4 5 6 7 8 9 10 11 | function define_content_width() { if ( is_post_type_archive( 'sounds' ) || is_home() || is_archive() || is_search() || is_tag() ) { global $content_width; $content_width = 225; } if ( is_singular( 'sounds' ) ) { global $content_width; $content_width = 594; } } add_action( 'template_redirect', 'define_content_width' ); |