New Landing How can we help? Themeforest Theme Support Dante Overriding theme files

Tagged: 

Viewing 15 posts - 1 through 15 (of 16 total)
  • Posted in: Dante
  • #139385
    wildfox
    Member
    Post count: 58

    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

    #139424
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    I’ll forward this to my colleague for you who should be able to help you

    – Kyle

    #140568
    wildfox
    Member
    Post count: 58

    Hi,

    I don’t have any news about my request so I ask again.

    thanks

    #140722
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    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.

    #140848
    wildfox
    Member
    Post count: 58

    Hi,

    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.

    #141135
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    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

    #141137
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Other solution is to use this plugin

    Real-Time Find and Replace

    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

    #141171
    wildfox
    Member
    Post count: 58

    ok I’ll wait until the next update… hopefully coming soon.
    The plugin rtfr doesn’t work in my case.

    #141175
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem

    #222600
    buddyq
    Member
    Post count: 32

    I 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??

    #222628
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    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

    #222650
    buddyq
    Member
    Post count: 32

    If that’s true, is there another way I can activate page builder on other custom post types from inside my child theme?

    #222922
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi 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

    #225593
    buddyq
    Member
    Post count: 32

    Thank you! That worked perfectly!

    #225641
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Great, thanks Ed

    – Kyle

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register