responsive_mobile_content_width

Adjust content width in certain contexts.

Description

responsive_mobile_content_width(); 

Adjusts content_width value for full-width and single image attachment templates, and when there are no active widgets in the sidebar.


Usage

  1. if ( !function_exists( 'responsive_mobile_content_width' ) ) { 
  2. require_once '/includes/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = responsive_mobile_content_width(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/functions.php  
  1. function responsive_mobile_content_width() { 
  2. global $content_width; 
  3. $full_width = is_page_template( 'full-width-page.php' ) || is_404() || 'full-width-page' == responsive_mobile_get_layout(); 
  4. if ( $full_width ) { 
  5. $content_width = 1140; 
  6. $half_width = is_page_template( 'sidebar-content-half-page.php' ) || is_page_template( 'content-sidebar-half-page.php' ) || 'sidebar-content-half-page' == responsive_mobile_get_layout() || 'content-sidebar-half-page' == responsive_mobile_get_layout(); 
  7. if ( $half_width ) { 
  8. $content_width = 570;