-
AuthorPosts
-
September 30, 2017 at 4:45 am #858661
hello,
we added the “child latest news” widget to our sites sidebar & discovered the image was just waaayyyy tooooo small. i couldn’t find how to control this with just css overrides, so i searched these forums & found 2 pieces of code to add to our child functions.php file…
the first was…
$avia_config['imgSize']['widget'] = array('width'=>250, 'height'=>250);
for reference, this did not make a bit of difference. i’m confused as to why not tho, since it seems to be a direct override of what’s in the main theme’s functions.php file.
the second was…
add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 ); function enfold_customization_modify_thumb_size( $size ) { $size['widget'] = array('width'=>250, 'height'=>250); return $size; }
this worked.
note: yes, i read & can bare witness that in order for this to work, we had to “regenerate thumbnails” via that plugin. which is unfortunate that this action requires the use of yet another plugin. but… it worked.
note2: and yes, this still required a little bit of css’ing…aside.sidebar .news-thumb, aside.sidebar .news-thumb img { float: none !important; width: 100%; height: auto; }
so, that’s all fine (sorry to be so long winded here, but we’re finally to my question) – the problem is, now that that’s working, when we go in to the wp-admin > posts, all the featured images there are huge & gets muddled up with the text & links for each post.
so it looks like the theme’s latest post widget uses the same code naming as the wp admin post page. ugh!
is there a way to separate these? i did not want to change the admin interface at all.
& whilst i’m on the subject, i just don’t get the purpose of generating all those image sizes for each uploaded image. it’s such a waste. is there a way to just have what’s needed be auto-generated when called upon?
also, if i want to delete all the extra ones, how do i know what’s safe to delete & what’s not? do i have to go thru my site & just look at the code for each image to see what size it’s using?
thanks.
October 1, 2017 at 12:30 pm #858889Hey SyberKnight,
Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardOctober 1, 2017 at 6:24 pm #858948This reply has been marked as private.October 2, 2017 at 2:02 am #859033thought i’d followup with an annotated screenshot…
so, to sum up my questions (#1 being the most important):
1) how can i fix the unexpected resulting consequence in the wp-admin > Posts page that occurred from using the provided code to modify our “latest news widget” display in the sidebars?
2) is there a way to have all the extra image sizes that auto-generate upon upload to only occur if & when needed?
3) i saw code (in this post) that would supposedly stop the generation of unneeded images, BUT, how can i know which ones to safely stop & delete?
thanks.
October 2, 2017 at 5:35 am #859072Hi,
Thanks for the login details and screenshot, the only thing missing is a URL to your site I think?
Best regards,
RikardOctober 2, 2017 at 7:13 am #859106DOH! & here i thought i was being so thorough ;-)
sorry ’bout that.
added in private section.October 3, 2017 at 8:50 am #859508Hi,
Please reset the “widget” thumbnail size to default or the original. Regenerate the thumbnails again then edit the front page. In the advance layout builder, edit the Blog Posts element. Set the “Preview Image Size” to the second option or “manual”. You’ll be able to select a different thumbnail size, one that will not affect the “widget” thumbnail.
Best regards,
IsmaelOctober 5, 2017 at 7:42 pm #860732hi Ismael,
apologies, but i’m not following you on this one yet…
by resetting the widget thumbnail size, i assume you mean to take the custom code out of the functions.php file, & remove my custom css. doing this puts the sidebar widget back to its default tiny thumbnail.
i used the plugin & regenerated the thumbnails.now, the only place i could find this “Preview Image Size” option was in the News Page > Blog block settings (which displays all news posts excerpts & thumbs nicely), and in the Home Page > Blog block settings (which displays only 1 latest post thumb & title). so i changed it in both places to be 300×300 (as there’s no 225×225 option; i figure i can shrink it in css).
i saved this but it did not make any changes anywhere in the site that i could see.
– the sidebar theme-child latest news widget is still teeny-tiny on pages with the sidebar,
– the homepage feature img thankfully that did not change, i have it set for 225×225.in your message you said that here i’d “be able to select a different thumb size, one that would not affect the widget thumbnail“… BUT, the widget thumb is exactly what i WANT to affect. i’m just trying to make that tiny tiny tiny thumb in the sidebar widgets big, without it affecting OTHER areas of the site (like what i put in the screenshot, how the code changed it but also changed the admin posts page too).
i noticed too, when looking at the source code of the rendered page, the sidebar thumb img tag has all these other “srcset” images in it. what is that all about? why isn’t it just the one size i want it to be?
<img width="36" height="36" src="http://thisonesforthegirlsthemusical.com/wp-content/uploads/2017/09/review-image1-36x36.jpg" class="attachment-widget size-widget wp-post-image" alt="" srcset=" http://thisonesforthegirlsthemusical.com/wp-content/uploads/2017/09/review-image1-36x36.jpg 36w, http://thisonesforthegirlsthemusical.com/wp-content/uploads/2017/09/review-image1-80x80.jpg 80w, http://thisonesforthegirlsthemusical.com/wp-content/uploads/2017/09/review-image1-180x180.jpg 180w, http://thisonesforthegirlsthemusical.com/wp-content/uploads/2017/09/review-image1-120x120.jpg 120w, http://thisonesforthegirlsthemusical.com/wp-content/uploads/2017/09/review-image1.jpg 225w" sizes="(max-width: 36px) 100vw, 36px">
thanks for your time & assistance!
October 6, 2017 at 7:43 pm #861157any ideas? have i stumped ya? ;-)
if i haven’t heard back by tonight, for the weekend, i’m gonna need to put it back the way i had it & just live with the exploded thumbs in the admin area until you can help me fix this. having the blurred thumb on there just doesn’t look good & the owner is concerned about that. so hopefully you know what to do & can get back to me asap.
thanks.
October 7, 2017 at 3:36 am #861251Hi,
by resetting the widget thumbnail size, i assume you mean to take the custom code out of the functions.php file, & remove my custom css. doing this puts the sidebar widget back to its default tiny thumbnail.
Yes, that’s what I meant. Are you referring to the “Featured News” section when you say “sidebar widget”? Isn’t that a blog posts element? It’s going to use another thumbnail if you change the “Preview Image Size” settings. If you need to control the size of the available thumbnails, just install the following plugin then go to the Settings > Media panel.
// https://wordpress.org/plugins/simple-image-sizes/
Best regards,
IsmaelOctober 7, 2017 at 3:50 am #861259hmmm, i wonder if we’re miscommunicating with each other, because now I’M confused.
firstly, i don’t want to have to use a whole plugin just to change this one image size. i’ve seen reference to the plugin you mention around on this forum, and i looked in to it, but it hasn’t been updated in a while & wordpress gives a warning about that. besides, the screenshots of it look very confusing.
so, i’ll try to re-explain what we’re trying to accomplish…
on pages with sidebars, and only there, i have placed the Enfold Child Theme Latest News: Featured News widget.
by default, when rendered on page, this gives the feature image thumbnail at a very tiny size, floated left, with the title & date to its right.
we want instead for this to have a large image (as large as will fit within the padding of the sidebar), not floated, & the title & date below it.
i’ve changed the css to make it look like this, but as you know, the actual image size is not changing with that, thus it being blurry.
SO, how can i change this one particular image size?
note, the php code i ‘had’ in the functions.php (mentioned above) DID work for changing this image size correctly; but the bad side-affect was that it also changed the wp-admin thumbnails.
i do NOT want any of the wp-admin pages to change.
i do NOT want to change the feature image single latest blog post on the homepage either (i only mention this because it also uses the feature image of the latest blog post, but not from the widget, from the page editor).does that make more sense?
thanks.October 7, 2017 at 6:24 am #861324FYI for future reference (in case anybody ever needs this info)…
the answer to this is solved, but cross-posted @ https://kriesi.at/support/topic/blog-page-corruption
October 9, 2017 at 7:38 am #861766 -
AuthorPosts
- You must be logged in to reply to this topic.