Jump to content

Archived

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

John Olsson

Override a include-file

Recommended Posts

John Olsson+    8
John Olsson

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
Rob    547
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


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

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
Rob    547
Rob

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


Former PageLines Moderator, Food Expert and Raconteur

Share this post


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

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
John Olsson+    8
John Olsson

Tnx, i'll check it out!

Share this post


Link to post
Share on other sites
Rob    547
Rob

Happy to help.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


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

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
Rob    547
Rob

That sounds about right.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

  • Similar Content

    • jason.
      By jason.
      Website URL: boneyard.teddyaddiction.com/kruss
       
      Framework Version: DMS 1.1.1
      WordPress Version: 4.1.1
      Plugins in Use: Custom Sidebars, Post Duplicator
      Server/Host: Linux somethingOrOther/ASmallOrange
       
      Details:
      Ok, this is driving me up the wall. Ready to start breaking stuff :)
       
      I can't seem to add a php include to grab a piece of code. I have a formatted email subscription box that I want to call from within a page. I've been trying and trying for hours now and can't get anything to work.
       
      Here's my code. It's in a textbox section:
      <div class="signupBox"><h5>Hungry for more?</h5> More articles, coming right up. Punch in your email below and we'll let you know as soon as they're ready to devour. </div> <?php get_template_part( 'emailBox ' ); ?> <?php include ( 'emailBox.php' ); ?> <?php include 'emailBox.php'; ?> <?php include ($_SERVER['DOCUMENT_ROOT'].'/emailBox.php'); ?> The text looks great, the php stuff doesn't work. None of them.
       
      I can't see any errors, and it looks like Pagelines adds comment tags around the php when it's rendered! Yikes!
       
      When I view the page source they all look like this:
      <!--?php get_template_part( 'emailBox ' ); ?--> Really frustrating.
       
      Everything was going along swimmingly and now I'm growing gray hairs faster than your grandma.
       
      Any idea how I can add a simple php include?
       
      Cheers,
      J.
    • bjs198
      By bjs198
      Hey team,
       
      I've set a global <p> style in the custom scripts box using code from google fonts which works great, however I'd now like to use a additional google font style with a couple of small text sections. When I try to style the specific text box using the Inline CSS Styling field I find it doesn't work and reverts to the global style.
       
      Am I doing something wrong or can you not override the global text style?
       
      ^ sorry bold, no idea why I can't get rid of it :)
       
      Cheers
       
      Barney
    • bloom1creative
      By bloom1creative+
      Hi guys
       
      I have had a quick look on the forum and can't seem to see my issue addressed exactly, so I'll ask it on here.
       
      I have seen some others with the same issue as me losing widgets or areas/classes when applying templates to certain pages, which is something I have begun to accept now with the DMS as it's happening across various sites.  I don't know if some of my issues are due to having quite a bit of LESS in the front end, too much for the complier to handle perhaps causing errors in other functions, as the cmd+enter stops working sometimes until I dump the LESS into style.less and it works again.
       
      My biggest question though, is with the templates.
       
      Say template 1 is running across 10 pages, it pulls in the info and that's all fine for them.  
       
      All you really want from the template is the 'areas', and not the individual page settings for that page as every page is different.  This was never an issue in Pagelines Framework, but the DMS seems different.  
       
      So lets say I have a page on frogs, and a page on golf, both set to template 1.  
       
      I add another two widgets to the frog page with classes and settings I wish to use & then update with template 1.
       
      How does this work, as the golf page updates with the frog pages custom settings/images/text, and not simply the difference from when I added template 1.  
       
      My understanding is using templates in this fashion seems somewhat difficult if you then wish to update one in the future (kinda the point of a template), as the page you use to 'update configuration' will surely then override the other pages' settings on that template?
       
      I hope I'm missing something, this was just never an issue in Pagelines Framework and confused me a bit on the DMS.
       
      I trust this makes sense,  :D
    • bigtopmultimedia
      By bigtopmultimedia
      Is it possible to override a file from the /pagelines/includes folder in a child theme? I have tried it and it doesn't seem to work.

      If the normal method of copying the file into the child theme folder doesn't work, how would I change the grid() function in library.layouts.php to include an ordinal for each box? (Note, the php code to achieve this isn't the problem, just how to get around pagelines "underriding" my customisation).
    • blingoblam
      By blingoblam
      Hi,
       
      Love how Citi looks - I just want to put the blog up top. Can I use the Content Override settings to do that? What would the page IDs be?
       
      Thanks!
×