Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Overriding theme files
New Landing › How can we help? › Themeforest Theme Support › Dante › Overriding theme files
Tagged: override
- This topic has 15 replies, 6 voices, and was last updated 8 years by Kyle – SUPPORT.
-
Posted in: Dante
-
January 6, 2015 at 2:31 pm #139385
Hi,
I have a child theme and I’d like to override the file interface.php which is located in dante/swift-framework/sf-shortcodes/.
All strings within <p class”info”></p> are not set to be translated so the only way to have it in french (or other language) is to override the file with a modified interface.php file in my child theme.
How to please?regards
January 6, 2015 at 4:14 pm #139424Hi
I’ll forward this to my colleague for you who should be able to help you
– Kyle
January 10, 2015 at 1:10 pm #140568Hi,
I don’t have any news about my request so I ask again.
thanks
January 12, 2015 at 12:00 am #140722Hi,
Create the same folder structure in the child theme, dante/swift-framework/sf-shortcodes/ and then put the file interface.php and do your changes, it will automatically get override.
else,
Try to cover the untranslated string to
_e('Button', 'swift-framework-admin');
and then run the translate plugin ( codestyling localization ) or use manual method using POEdit to recreate the .po then try to translate.
Let us know,
Thanks,
laranz.January 12, 2015 at 10:39 am #140848Hi,
The first method doesn’t work at all. I already tried to put interface.php in my child theme after making some translations.
I know that a file located in a child theme folder (child-theme/file.php) get override but I read something about files located in child theme subdirectory doesn’t get override.
How interface.php is included to the theme?The second method is not a good one for me. I don’t want to modify original dantes files, it would be a mess to keep it up to date.
January 13, 2015 at 11:07 am #141135Hi,
That’s not viable to try to override that file it’s too complex, we prefer to fix the original problem of the missing translations in the next update.
That’s ok with you?
-Rui
January 13, 2015 at 11:28 am #141137Other solution is to use this plugin
Set up find and replace rules that are executed AFTER a page is generated by WordPress, but BEFORE it is sent to a user’s browser.
Hope it helps.
-Rui
January 13, 2015 at 2:23 pm #141171ok I’ll wait until the next update… hopefully coming soon.
The plugin rtfr doesn’t work in my case.January 13, 2015 at 2:28 pm #141175No problem
October 22, 2015 at 4:24 pm #222600I have sort of the same request. I modified the /swift-framework/page-builder/builder/lib/builder.php file to also include a custom post type on line 62 so that I could also use page builder in my own post types and it works great. After an update, I lost it. So I am now using a child theme and wondering how to override this file using my child theme??
October 22, 2015 at 5:46 pm #222628Hi,
I think it’s not possible to override that file. Will need to forward to the development team so they can confirm if it’s possible or not.
Thanks
-Rui
October 22, 2015 at 7:46 pm #222650If that’s true, is there another way I can activate page builder on other custom post types from inside my child theme?
October 23, 2015 at 4:11 pm #222922Hi there,
Yes – you can filter the array of post types to add/remove/replace as you like. See this code:
function custom_page_builder_post_types() { return array('page', 'post', 'portfolio', 'product', 'team', 'jobs', 'ajde_events'); } add_filter( 'spb_pt_array', 'custom_page_builder_post_types' );
– Ed
November 3, 2015 at 8:47 pm #225593Thank you! That worked perfectly!
November 4, 2015 at 8:41 am #225641Great, thanks Ed
– Kyle
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.