Rewriting Cornerstone files in child theme

Hi

Is it possible to rewrite Cornerstone files located at /cornerstone/includes/views/ using the child theme the same way we can rewrite views in framework folders?

Adding a custom element is not appropriate. What I want to achieve is to change background output to include a new class (jQuery solutions not appropriate) and move an attribute.

Hello @kolyasapphire,

Thanks for writing in!

Rewriting or overriding existing functionality of current elements is possible but it would be outside the scope of our support. We can help you with adjusting design through simple CSS but other than that, in case you are not comfortable editing codes, you may wish to consult a developer to achieve this. This guide might help: https://theme.co/apex/forum/t/cornerstone-custom-elements/217

Thank you for your understanding.

Hi @RueNel

I asked a very specific question - can I override files located at /cornerstone/includes/views/ by files in the child theme, like with framework folders or not. What you answered is not helpful at all, I’m not asking you to do the modifications - I’m asking if the same customisation method written on your support articles applies to these files also. I’ve already read the page you mentioned and because of that wrote “Adding a custom element is not appropriate.” because I knew you would link to that.

To demonstrate:
I’d like to rewrite /pro/cornerstone/includes/views/partials/bg.php
With /pro-child/cornerstone/includes/views/partials/bg.php

Hello @kolyasapphire,

What you have in mind is just not possible in Cornerstone. It is best that you replicate the element and make your own custom element instead. This should also prevent any issues when there is an update of the plugin.

Thank you for your understanding.

Hi @RueNel

Yep that’s what I was afraid about, thanks for clarifying.
Unfortunately, this file is for generating background markup from Pro, so a custom element is not an option, might just do the changes manually.

Great! Thank you for letting us know.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.