• 0
Sign in to follow this  
Followers 0

Override a include-file


Question

Posted · Report post

I'm trying to override the include file library.wordpress.php located in dms/includes by putting a copy and my changes in child-theme/includes but it doesen't kick in och work.. Or is it not possible to do this, just like u do with for example section?

Share this post


Link to post
Share on other sites

9 answers to this question

  • 0

Posted · Report post

Hi John,

 

Unfortunately, that can't be done.  That would be editing core files and is unsupported.

 

There are plugins letting you create PHP includes within DMS pages.  I'd suggest using one of those, rather than trying to edit core files.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Ah, i'll understand, really, i would just like to change this...
 
add_image_size( 'landscape-thumb', 900, 450, true );
 
To..
 
add_image_size( 'landscape-thumb', 900, '', true );
 
So I don't have the hard crop, maybe there's a way around this?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Use WP settings in Dashboard > Settings > Media, where you can set the size of images.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

That i know ofc, but the 900x450px is a preset thats located in library.wordpress.php and thats the one who is choosen as standard for Featured image.

 

I don't wan't it to make a hard crop on the image, therefor add_image_size( 'landscape-thumb', 900, '', true );

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Tnx, i'll check it out!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Happy to help.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Almost forgot to reply the correct answer:

 

Put..

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 );

Into your child-themes function.php, simple!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

That sounds about right.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0