Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter jamescockroft

    (@jamescockroft)

    Short answer: if you use Jetpack’s Comment functionality, DO NOT active this option. It will break comment functionality on your site.

    Thread Starter jamescockroft

    (@jamescockroft)

    Hi agpashion, I never did, but I got happy enough with it.

    With my current settings, large images are still stuck at 525px, and galleries are stuck at 800px. Custom sizes work, and full size gets resized to the max width.

    I never used many large images anyway, so this isn’t a huge problem for me. I’d still love to find a fix, but the image sizes are hard coded in the parent theme functions file, and I’ve tried all kinds of things, but still haven’t found a way to overwrite those functions in my child theme.

    Here are the relevant sections from my functions file:

    Up at the top of the functions file for my child theme, I entered:
    remove_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_attr' );

    This did something, I think… I’m not sure what, to be honest. It’s been awhile since I messed with this.

    Lower down, I set a new default content width:

    function childtheme_content_width( $content_width ) {
        if ( twentyseventeen_is_frontpage() ) {
            $content_width = 1200;
        }
        return $content_width;
    }
    add_filter( 'theme_setup', 'childtheme_content_width' );

    Sorry I can’t be more help!

    My site is down too.

    Parse error: syntax error, unexpected ‘:’, expecting ‘;’ or ‘{‘ in /home/…/wp-content/plugins/sunny/src/Sunny.php on line 99

    Thread Starter jamescockroft

    (@jamescockroft)

    Probably not, but if I can solve the issue with Large images, that should also solve the issues with Jetpack galleries.

    (The problem persists even with Jetpack deactivated.)

    I’m getting tired of messing with it to be honest, but I think a solution is out there somewhere.

    Thread Starter jamescockroft

    (@jamescockroft)

    Thanks again. Still no joy.

    I’ve tried disabling all plugins, I’ve tried a fresh child theme, everything I can think of. Something, somewhere is causing wordpress and jetpack to see the content width setting in twenty seventeen.

    I’ll keep playing. It could be something in my dev server too, so I’ll probably wipe it and start from scratch everywhere.

    Thread Starter jamescockroft

    (@jamescockroft)

    Thanks!

    That doesn’t work for me for some reason.

    The WordPress display settings panel (when you Add Media) shows large images as max width 525. If I set a custom size, it respects it. But my Media settings have Large images at 800 wide, and if I regenerate thumbnails, it generates 800px wide Large images.

    Jetpack galleries still show at 740 px wide too.

    I’m going to experiment a bit. It could be some other function or css in my theme tearing stuff up.

    In a child theme, add

    single-post #secondary {
    display: none !important;
    }
    .single-post #primary {
    width: 100% !important;
    }

    And make adjustments from there.

    So far, the biggest problem I’ve found is getting WordPress to size ‘Large’ images to my specifications, and Jetpack galleries to follow the content width. Both of those follow some functions in the Twenty Seventeen theme that I haven’t found a way to kill yet.

    Thread Starter jamescockroft

    (@jamescockroft)

    Resetting the content width appears to do nothing… I copied/pasted this code directly from the website referenced above and it appears to do nothing.

    function childtheme_content_width( $content_width ) {
        if ( twentyseventeen_is_frontpage() ) {
            $content_width = 960;
        }
        return $content_width;
    }
    add_filter( 'twentyseventeen_content_width', 'childtheme_content_width' );

    I tried killing the twentyseventeen_content_width_attr filter with:

    function child_remove_twentyseventeen_content_image_sizes_attr() {
        remove_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_attr', 10, 2 );
    }
    add_action( 'wp_loaded', 'child_remove_twentyseventeen_content_image_sizes_attr' );

    Nothing.

    I tried to write my own version:

    function jcseventeen_content_image_sizes_attr( $sizes, $size ) {
    	$width = $size[0];
    
    	if ( 740 <= $width ) {
    		$sizes = '(max-width: 706px) 100vw, (max-width: 767px) 100vw, 1000px';
    	}
    
    	if ( is_active_sidebar( 'sidebar-1' ) || is_archive() || is_search() || is_home() || is_page() ) {
    		if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) && 767 <= $width ) {
    			 $sizes = '(max-width: 767px) 100vw, (max-width: 1000px) 100vw, (max-width: 1071px) 1000px, 1000px';
    		}
    	}
    
    	return $sizes;
    }
    add_filter( 'get_parent_theme_file_path', 'jcsventeen_remove_twentyseventeen_content_image_sizes_attr', 15, 2 ); 

    Nothing.

    Any suggestions? Where am I going wrong?

    css…

    .panel-image:before {
    /* Permalink – use to edit and share this gradient: https://colorzilla.com/gradient-editor/#000000+0,000000+100&0+0,0.3+100 */ /* FF3.6-15 */
    background: -webkit-linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 100%); /* Chrome10-25,Safari5.1-6 */
    background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0)));
    background: -webkit-linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 100%);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=”#00000000″, endColorstr=”#00000000″, GradientType=0); /* IE6-9 */
    /* bottom: 0; */
    /* content: “”; */
    /* left: 0; */
    /* right: 0; */
    /* position: absolute; */
    /* top: 100px; */
    }

    That should do it. It works on my dev server anyway.

    Just popping up to say I have the same issue.

    Edit: tried setting .cache permissions to 755 with no joy. Pages appear to be caching.

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