• Resolved wagedu

    (@wagedu)


    Hi, first of all thanks for the neat plugin.
    But I’m having a problem with it.
    My configuration: Twentig > Posts Page & Archives > Blog Layout “Grid Cards” // Blog Columns “3”.
    Following the default CSS, the maximum width of the site content will be 1120px (reaching the max-width of 120rem-8 etc)
    Under this configuration, when visiting the “archive” page for any category, each column (and each image) will reach a maximum width of 550px when the screen width is 1219px, and twentig’s CSS adapts to 2 columns. But the “img width” stays “800px” thus calling the next bigger size in srcset, which is 1024px ??
    Even if I get to a screen width over 1219px, where twentig changes to those 3 columns and each column is below 400px, the “img width” is still 800px, forcing the srcset to call the 1024px version of the image…
    How can I fix it so the computed width is the columns’ one, and the correct image version is used?
    Thanks in advance ??
    EDIT: my mistake. The biggest image size for the images in the cards would be aprox 658px when the screen is at 699px width (Twentig’s one column). But it’s still below 768px, which should be the image’s version used (not >800px)

    • This topic was modified 4 years, 8 months ago by wagedu.

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Twentig

    (@twentig)

    Hi @wagedu,

    Thanks for your message and detailed feedback ??. We’re looking into it, and we’ll keep you updated.

    Have a nice day.

    Thread Starter wagedu

    (@wagedu)

    Thanks to you ?? I’ll wait for it.
    On the meanwhile (lol) is there a way to enjoy Twentig without using your footer widget areas?
    I mean, I had a 3-areas (3-rows) footer, css-grid, built in my child theme, but it is now overwritten by your 2-column/2-row footer.
    Is there a way to disable it? i mean, I could delete your footer.php but whenever I update the plugin we’ll be back to square one.
    Or I could manipulate your rows via CSS but… I guess there’s a relly simple solution that I’m too obtuse to find. Could you help?
    Thanks in advance!

    Plugin Author Twentig

    (@twentig)

    Twentig only changes the widget areas layout (by applying some CSS) if you select Row as the option for Widgets Layout (Customizer > Twentig Theme Options > Footer). If you set the option as Column (Default), it should keep your code intact.

    If it doesn’t solve the issue, you can try to set the Bottom Footer Layout and Footer Credit settings to default. That way, Twentig won’t override the footer PHP code.

    If it still doesn’t work, you can completely remove our code by pasting remove_action( 'get_footer', 'twentig_get_footer', 9 ); inside the functions.php file of your child theme.

    I hope the above is useful to you. ??

    Thread Starter wagedu

    (@wagedu)

    Once again, thanks for the quick reply.
    Hoping this info helps: it didn’t change back until I removed the custom Footer Credit.
    I see your updating the plugin almost daily. Which is great but also a pity (lol) since I wanted to modify it to include my 3 rows in your code, hehe.
    Anyway, I’ll keep an eye for the srcset stuff I started the thread with.
    Thanks again, great people of Twentig!
    EDIT: Twentig’s widget areas are still there even after adding (to my child theme’s functions.php)
    remove_action( ‘get_footer’, ‘twentig_get_footer’, 9 );

    • This reply was modified 4 years, 7 months ago by wagedu.
    Thread Starter wagedu

    (@wagedu)

    Hi all, how you doing?
    Haven’t heard from you in 2 weeks regarding the srcset problems, and after seeing WordPress update to 5.5 I can understand why, lol.
    Still, do you have any updates/news? Please, don’t get me wrong! Asking just to know if I have to start coding the archive templates manually. Only a couple of weeks before delivering the site!!
    Other than that… where you taking your coffees? Couldn’t find a link and, even if just for the font management, awesome plugin, caffeine deserving ??
    Thanks! Have a nice week!

    Plugin Author Twentig

    (@twentig)

    Hi @wagedu,

    Doing fine, and you? ??

    We’ll be back to you tomorrow. We have to check a few more things with the srcset.

    Concerning the coffees, there’s a donate button on the Twentig WordPress plugin page just below the “View support forum” button.

    Thanks!

    Thread Starter wagedu

    (@wagedu)

    hahaha! I Ctrl-F’ed “coffee”, lol, facepalm
    Enjoy the coffee, cheers!

    Plugin Author Twentig

    (@twentig)

    Hi @wagedu,

    Thanks for the coffees ??

    We’ll change the blog image srcset attribute in the next release (next week).
    In the meantime, if you need to, you can add the following PHP code in your child theme:

    function tw_change_blog_srcset( $sizes ) {
    	if ( is_home() || is_author() || is_category() || is_tag() || is_date() || is_tax( get_object_taxonomies( 'post' ) ) ) {
    		$sizes = '(min-width: 1220px) 380px, (min-width: 700px) calc(50vw - 56px), calc(100vw - 40px)';
    	}
    	return $sizes;
    }
    add_filter( 'wp_calculate_image_sizes', 'tw_change_blog_srcset' );

    If you test in your browser, you need to clear the cache each time. Because as you scale your viewport, if the browser already has a bigger image in the cache it won’t request the smaller ones.

    Please note that with srcset, all we’re doing is telling the browser about some images that we have available and what size they are. The browser then does all the work figuring out which one will be best. Source

    Thanks again for pointing this out!

    Have a nice day.

    Plugin Author Twentig

    (@twentig)

    Hi,

    We’ve just released version 1.1.1 that includes the code to improve the image sizes.

    Have a nice day ??

    Thread Starter wagedu

    (@wagedu)

    Hi again. I tried to SUPER THANK YOU <3 but couldn’t post on a closed topic.
    Now… would you be so kind as to delete this topic? We’ve been (are) under Bruteforce Attack and I wouldn’t like to give any info away as to which plugins we’re using under which URLs.

    Thanks

    Plugin Author Twentig

    (@twentig)

    Hi wagedu,

    Thanks for your message. We don’t have the capability to delete the topic. We’ve reported this topic to see if a WordPress moderator can delete your URL.

    Note to moderator: Could you please delete the URL posted in the first message by wagedu?
    Thanks.

    Moderator Marius L. J.

    (@clorith)

    Hiya,

    Marius here, one of the moderators here at www.remarpro.com

    There’s no public facing URLs in this thread, the only link is in the initial post to the topic, which is only visible to users logged in and used for support purposes. As such, there’s no need for moderation here.

    Plugin Author Twentig

    (@twentig)

    Hi Marius,

    Thank you for your prompt reply.

    Have a nice day.

    Thread Starter wagedu

    (@wagedu)

    Ok @twentig, to you, sincerely many thanks again, you tried.
    To Marius: WordPress hackers don’t log in to wp support forums? lol
    Cheers, have a nice weekend

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Columns code picks too large images’ is closed to new replies.