$content_width
is used to set the default width of embeds, for situations when an element needed to specify a width. This is how WP knew the width of the main content area.
However, this was back before the push for responsive design, and modern CSS with fluid embeds and responsive breakpoints. So it isn’t needed much but it can still result in odd embeds if you set a bad value. Content width sometimes gets used in other edge cases too, but that was the main use case and its reason for being.
So I suggest:
- Figure out the content width on the most common desktop resolution, and use it to set
$content_width
infunctions.php
- Then, apply CSS to adjust embeds responsively/fluidly as you would normally do
Related Posts:
- Passing variables from header.php to template and vice verca
- When to use global $post and other global variables?
- Result of API Request to global variable?
- Best way to pass variables around a WordPress site?
- What does the Global Variable $s represent?
- Get current page id, title, url, etc
- keep a variable for all pages in memory from the url
- No access to global variables?
- SFTP define in wp-config.php
- Use a select box to change a php variable
- Error: “Cannot modify the return value” c#
- Python conditional assignment operator
- C++ identifier is undefined
- What is the PHP syntax to check “is not null” or an empty string?
- ISO C90 forbids mixed declarations and code in C
- Which variable size to use (db, dw, dd) with x86 assembly?
- Why SQL Server throws Arithmetic overflow error converting int to data type numeric?
- Character constant too long for its type
- What is the meaning of @_ in Perl?
- What is the meaning of @_ in Perl?
- Passing a variable to get_template_part
- What are all the Properties of the WordPress Post Object?
- Where to get information about array fields in $_REQUEST?
- WordPress variables and memory
- How to create custom variables in the wp-config
- Set cookie using GET variable
- {{ Double Curly Brace }} data.____ Variable Source in WP_Playlist Template
- What is the best way to store custom variables
- Setting Cookie Using a Variable from the URL
- How to set global variable in functions.php
- Retrieve the template directory URI via global or get_template_directory_uri() every time?
- WordPress filtering utm_ GET variables from url unless logged in as admin, not sure why?
- Using variable in two functions
- What is the $current_screen global variable?
- Passing variables to template parts
- Print string to footer using wp_footer option
- How to pass data around?
- How do I pass variables into short-code enabled Post Snippets in WordPress 3.0?
- Replacing string with a variable in php
- How does the $post_type global variable work?
- Add classname comment template from functions.php
- Why does a variable work on the front page but return NULL on all other pages?
- Call global variable array() in woocommerce child/template
- Variable scope producing undefined variable notices in included files
- Use to track referrals
- Can you keep session data for visitors?
- Changing static text in a theme into variable content that also respects language. Easiest way
- How to modify a global variable in a function and use it on another function?
- How do I share variables between two functions?
- Global Variable vs Local Variable
- Passing a variable from a FOREACH loop in a link
- What is the alternative code to if (isset ($_POST) && !empty ($_POST) to avoid warnings?
- Retrieve custom variable
- Is it advisable to use $post->comment_count instead of get_comments_number( $post_id )
- Pushing Category and Publish Date to Google Analytics
- Trying to create an edit page link?
- Cron Job variable not accessible
- How to access a variable on all page?
- Not passing correct value to get_post_ancestors?
- Help me edit a variable with php
- Preventing Duplicating Posts from Widgets
- Pass global variable from Page 1 to page 2 (Pagination)
- global $product is empty string when passed into function
- Custom global variable not working in function
- How to access custom class methods from any include without using global
- saving variables after redirect
- I need some explanation on global $post [duplicate]
- WP CLI – Pass Query / URL Variable to Cron?
- Can’t access a variable defined in another template despite using GLOBAL
- How to pass a variable for key/value pairs in an argument?
- Where and how to define variables for URLs etc
- Declare global variable that can be used on other function
- How to get variable from function.php to loop file
- Setting a cookie in functions.php and it gets deleted when working on an other function
- Best way to access variables in template markup
- Editing Global Variables from Inside Functions
- Pass variable to next page
- passing javascript variable into php wordpress
- How to set global variable in functions.php
- Current URL path variable
- Remove # from a Variable [closed]
- How to pass post title (which could include &) to Gravity Form
- Variables posting twice
- Passing variables trough 2 pages
- update_option using variable name
- assign the returned value of wordpress function to a variable?
- Pass var into wp function instead of direct string text
- How do I access variables outside a function [closed]
- Global Handle to Class unavailable in Plugin?
- How do I echo saved data outside the function?
- Having problems accessing $_GET values
- How to pass variable to functions.php?
- How can one use variables in a template or template part without polluting the global scope?
- Creating a Variable Product
- What is the difference between a local variable, an instance field, an input parameter, and a class field?
- Java, “Variable name” cannot be resolved to a variable
- Variables declared in header not available in other includes
- How to declare a JS variable in an AJAX call
- WordPress Image Slider Looping Title Not Working
- Redirect users in first login to a dynamic link