Jump to content

Archived

This topic is now archived and is closed to further replies.

John Olsson

My "hard crop-fix" don't work after latest update

Recommended Posts

John Olsson+    8
John Olsson

Hi all, 

 

Since the new update, that was awesome, i'll got problem with removal of hard-crop-fix as seen below, it did work in the previous version but not any more, any ideas what to do to make this work again?

 

The fix in my child-themes function.php:

add_theme_support( 'post-thumbnails' );
add_image_size( 'aspect-thumb', 900, 600, true );
add_image_size( 'basic-thumb', 400, 400, true );
add_image_size( 'landscape-thumb', 900, '', true );

Regards, John Olsson

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

Can you provide screenshots of what it is you currently have and what it is you want please.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
John Olsson+    8
John Olsson

OFC! :)

 

This code below is in my child-theme function.php and in the previous version of DMS, before the big update to 1.1 this worked fine, but this doesen't work anymore. 

 

Screen1.png

 

Now I must change it in the main core-files, and that's a big NO-NO OFC! :)

 

....cause the code above doesen't seems to take effect, u understand now? :)

 

And basically, i'll just removing the hard crop from featured images with the single quotes.. ''

Share this post


Link to post
Share on other sites
John Olsson+    8
John Olsson

Didn't get much of that.. Do u mean that I use the code in the screenshot? :)

Share this post


Link to post
Share on other sites
Simon    247
Simon

Yes but you have to wrap it in a function/action that will run after the one in dms core.

Share this post


Link to post
Share on other sites
John Olsson+    8
John Olsson

And how exactly do I do that?

Share this post


Link to post
Share on other sites
Simon    247
Simon

https://gist.github.com/7306679

 

Something like this.

  • Like 1

Share this post


Link to post
Share on other sites
John Olsson+    8
John Olsson

Aha... I thought that i'd should put i elsewhere than function.php — sry.. :)

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Is the issue now resolved ?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
John Olsson+    8
John Olsson

Yep, sry it was solved by putting the code in my child-themes function.php.

 

Very much thank U! :)

add_action( 'after_setup_theme', 'my_custom_sizes', 11 );
function my_custom_sizes(){
    add_image_size( 'aspect-thumb', 900, 600, true );
    add_image_size( 'basic-thumb', 400, 400, true );
    add_image_size( 'landscape-thumb', 900, '', true );
}

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Awesome, happy to hear you issue has been resolved.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
John Olsson+    8
John Olsson

Me to, cred to U ofc!

Share this post


Link to post
Share on other sites
John Olsson+    8
John Olsson

There is no "right answer" button in the forum, right?

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

There is a Mark Solved button, I'm just not sure you're able to click it/see it. 


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Well its not an issue, its our support teams job to identify the correct answer and mark the topic resolved, not the user. However, thank you for asking.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • BentleyD
      By BentleyD+
      Hey there,
       
      I am working on BentleyRolling.com. I used grams on MoonbodySoul.com and all the images are cropped to a square, whether they are square or 4:5 when posted on instagram, they still get cropped to a square. This looks way better than some being squares and some being 4:5. Did something change since I designed MoonBodySoul.com with Platform5? Can you help me crop all images to a square on BentleyRolling.com 
       
      All the best,
       
      Bentley
    • cstudio
      By cstudio
      How do I control the lightbox effect on the plugin "popthumbs"?  On mobile, it opens up much to small then when expanded it opens to large.  I would like to control the the lightbox to like 90% of the viewer window but I can't figure out how/where to control that.
      Site example

       
      Thx
    • Queue-it
      By Queue-it+
      Hi,
      I am using pl-section-journey and hiding most of the images. When running the page via google speed insights, it tells to optimize all the images that are in this plugins default. (e.g. https://queue-it.com/wp-content/plugins/pl-section-journey/images/drawer-5.jpg ) Like this one that is not visible on the website, but is a part of the plugin and comes up in google insights.
      I've deleted all the images in the plugin, but they still seem to come up. Ref. this page: queue-it.com/features
    • globalnative
      By globalnative+
      Hi there!
      I'm trying to create a featured image for my new blog post. It has text in it, and when I add it as a featured image some of the text is cut off on the right.
      Could I get the ideal dimensions for featured images? Or, a way to customise the dimensions so that they are easier to fit in the way I need?
      Thank you kindly
      Nate
       


×