Jump to content
bigtopmultimedia

Overriding includes in a child theme

Recommended Posts

bigtopmultimedia    2
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).

Share this post


Link to post
Share on other sites
Rob    547
Rob

Hi,

 

It doesn't seem like there is a simple solution for what you're trying to do.

 

The grid function has no filters, so, easiest way is to use a custom boxes section then, rather than using grid() use his own custom function.

 

We unfortunately cannot support editing core files.  We'll help with sections, languages, but the /includes folder is definitely a set of core files.

 

If you still wish to proceed in that direction, you'll need to hire a developer to create a new class and place it where it will not be overwritten.  I'd recommend contacting one of our Pros


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
bigtopmultimedia    2
bigtopmultimedia

Does it have to be the case that the normal override system doesn't work? Normally a duplicate of a file in a child-theme takes precedence over its parent.

Share this post


Link to post
Share on other sites
Simon    247
Simon

Does it have to be the case that the normal override system doesn't work? Normally a duplicate of a file in a child-theme takes precedence over its parent.

What do you mean by 'normal override system'? Are you referring to WordPress and template files? That only works for actual WP files, like header.php footer.php functions.php etc, not custom framework files.

 

Create a sections folder in the child theme and copy the boxes folder into it. Then edit away.

Share this post


Link to post
Share on other sites
bigtopmultimedia    2
bigtopmultimedia

Ah, ok - I was under the impression that it could work for any file in a child-theme folder. Thanks for the responses.

Share this post


Link to post
Share on other sites
Rob    547
Rob

You're welcome.


Former PageLines Moderator, Food Expert and Raconteur

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


  • Similar Content

    • abuzzelli
      By abuzzelli+
      Is there a shortcode or a way to automatically pull the site name into the footer or elsewhere?
    • MobileParity
      By MobileParity+
      Does anyone know what features have been included in the Foundation theme? Such as building blocks or the Motion UI?
    • DanatTLFN
      By DanatTLFN
      Site URL: http://thelocalfilmnetwork.com
      Host: GoDaddy
      Hi Pagelines team and community,
       
      I am going to be attempting to do a full migration from GoDaddy to WPEngine. 
      I need to know, will I lose the front-end customisations I have made?
      Also are there any backups or things I need to do to ensure that I do not lose any important info relating to the site?
      Kind regards,
      Dan
       
    • Bleuy
      By Bleuy+
      Hi All
      I have just migrated my theme from a perfectly functioning local version to my server and it looks corrupted.  I have followed the standard migration (Replace WP Content, Upload Database, Search & Replace URLs)
      Things I have tried to rectify the problem:-
      Changed Permalinks, deleted .htaccess file Deactivated Plugins Removed all custom CSS But It all still seems to have the same problem the url for the website is as follows: www.blueanchor-reigate.co.uk
    • JudithKlinger
      By JudithKlinger+
      I want to remove the 'this post was last edited by xxxxx at xxxxx date/time. 
      In going thru the Codex, this appears to be a theme setting? Is that correct? How do I remove it? 
      Thank you,
      Judith
×