Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    It seems that your theme already include a $content_width setting:
    https://themes.trac.wordpress.org/browser/the-newswire/1.0.7/functions.php#L71

    Could you check that your theme is up to date and includes that code?

    You might also want to change that value there if you’d edited the theme to have a larger content area.

    Let me know how it goes.

    Thread Starter Renssmit

    (@renssmit)

    Already checked that out, changing this value doesn’t fix it :/

    /**
     * Set the content width based on the theme's design and stylesheet.
     */
    if ( ! function_exists( 'newswire_content_width' ) ) :
    	function newswire_content_width() {
    		global $content_width;
    		if (!isset($content_width))
    			$content_width = 640; /* pixels */
    	}
    endif;
    add_action( 'after_setup_theme', 'newswire_content_width' );
    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    Could you try to install this small plugin, and change the custom width value by going to Settings > Media?
    https://wordpress.org/plugins/custom-content-width/

    Let me know how that goes.

    Thread Starter Renssmit

    (@renssmit)

    Doesn’t change anything :/

    I looked in the inspect element in Google Chrome this is what I see:

    class: tiled-gallery type-rectangular = width: 474px
    class: gallery row = width: 265px

    I don’t know if this has something to do with it but gallery row should be 100% so that would be 474 px.

    Would it be easier to help if you can see my WordPress website?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    Would it be easier to help if you can see my WordPress website?

    Yes, it would, thanks! Could you post a link to your gallery here so I can take a look?

    If you want your site URL to remain private, you can also contact us via this contact form:
    http://jetpack.me/contact-support/

    Thread Starter Renssmit

    (@renssmit)

    You can find the website online here now: http://renssmit.be/knokkeyachtswp/

    Thanks in advance!

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    Thank you!

    Since the gallery is added to one of your sidebars, the $content_width value won’t help here. You’ll need to overwrite the width value of the Gallery widget instead. Something like this should do the trick:

    function jeherve_custom_gallery_widget_width( $args, $instance ) {
            return '477';
    }
    add_filter( 'gallery_widget_content_width', 'jeherve_custom_gallery_widget_width', 10, 3 );
    Thread Starter Renssmit

    (@renssmit)

    Hello thanks for the help but where I have to put this code? In my functions.php?

    #edit: This works for me if I put it in functions.php, many thanks πŸ˜€

    This thread is resolved.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic πŸš€

    Yes, your theme’s functions.php is a good place to paste that code.

    You could also place it in a functionality plugin.

    That’s an excellent fix – had exactly the same problem. Thanks for posting it.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Tiled gallery width’ is closed to new replies.