• 0

$content_width support?


Question

Posted · Report post

Hi guys,

 

i am trying to work around jetpack tilled galleries and came across that the theme might not have this function specified.

 

I do not want to alter the theme functions for nothing so, according to this link,

 

http://codex.wordpress.org/Content_Width

 

does pagelines defines what is needed?

 

something like:

2
if ( ! isset( $content_width ) )
    $content_width = 800;

 

It needs to work for this

 

http://jetpack.me/support/tiled-galleries/

 

I do not want to alter because the framework has the width adjuster so i do not know how the code will affect things around.

Share this post


Link to post
Share on other sites

29 answers to this question

  • 0

Posted · Report post

Simon_P yes, galleries on both types of pages, full width and one sidebar pages.

Share this post


Link to post
Share on other sites
  • 0

Posted (edited) · Report post

Well where you set the variable your going to have to add some logic...

 

lets say page id 100 is full width and all others have a sidebar...

global $content_width;
if ( is_page( 100 ) )
    $content_width = 1200;
else
    $content_width = 800;
Edited by Simon_P
corrected logic

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Danny think this is worth a GH issue for DMS?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Danny think this is worth a GH issue for DMS?


Why ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now