New Landing How can we help? Atelier Child Theme

Viewing 12 posts - 1 through 12 (of 12 total)
  • Posted in: Atelier
  • #304835
    coridec
    Member
    Post count: 46

    Hi!

    I’m trying to set a child theme. I previously worked over the parent child but trying now to work with child theme as there are some pages I’ve edited and want to keep my theme up to date.

    I’ve copied the atelier-child folder into the server. Copied the parent pages that were edited into the child theme and updated the parent theme.

    I see my modifications are lost. Like the child theme pages are not overriding the parent theme’s pages.

    Is there something else I should check?

    sorry I’m very new to the child themes.
    Regards and thanks a lot.
    Corina

    #304993
    David Martin – Support
    Moderator
    Post count: 20834

    Corina what do you mean “parent pages”. Please be specific to what files you are wanting/trying to modify.

    Within the child theme for Atelier you would rarely need to copy over template files, unless it’s WooCommerce related. Mostly you would override parent theme PHP functions using functions/actions within the child theme functions.php file.

    #305118
    coridec
    Member
    Post count: 46

    Hi David,

    I’m sorry I didn’t explain myself well. I have edited some of the php pages for some customizations needed. Some of these are:
    sf-page-heading.php
    sf-theme-overrides.php
    sf-woocommerce.php
    sf-combined.min.css
    header-3.php

    And some functions on:
    functions.min.js
    functions.php

    It’s little stuff but enough for the template to work as needed for the client.

    So know what I want is to try and work with a child theme so I can update easily and not have these edits overwritten. As I understand just putting these files into the child theme should be enough, of course I could be mistaken. I’ve tried setting it but I can’t make it work.

    Thanks for your help. Regards,

    Corina

    #305124
    David Martin – Support
    Moderator
    Post count: 20834

    HI Corina,

    Those are not template files. Those PHP file contain PHP functions that are hooked into the theme templates via WordPress actions.

    Within the files you need to find what PHP function you have modified, then you copy/paste the specific PHP function into the child theme functions.php.

    The CSS/JS files are core theme files and should not be edited. To make new CSS changes, you can override styles by adding your CSS to the child theme style.css file or by adding it to Theme Options => Custom CSS.

    To make new JS you would need to create and enqueue a new JS file or add your jQuery to Theme Options => Custom JS.

    #305128
    coridec
    Member
    Post count: 46

    Great David, thank you very much. I’ll give it a try and let you know.

    Regards,

    Corina

    #305129
    David Martin – Support
    Moderator
    Post count: 20834

    Glad to help you out.

    #314605
    hossein
    Member
    Post count: 4

    Hello,

    I got the same issue but cannot resolve it.
    I would like update a function in sf-theme-overrides.php.
    I tried this in my function.php

    remove_filter(‘sf_add_to_wishlist_icon’, ‘sf_atelier_add_to_wishlist_icon’);

    function hk_atelier_add_to_wishlist_icon() {
    return ‘<i class=”sf-icon-wishlist”></i><span>Ajouter à la liste</span>’;
    }
    add_filter(‘sf_add_to_wishlist_icon’, ‘hk_atelier_add_to_wishlist_icon’);

    But it’s not working, also if I just copy past the function from original file (and do not update the name), I got this message:
    Fatal error: Cannot redeclare sf_atelier_add_to_wishlist_icon() (previously declared in /home/byluxema/staging/2/wp-content/themes/byluxemarket/functions.php:162) in /home/byluxema/staging/2/wp-content/themes/atelier/includes/overrides/sf-theme-overrides.php on line 122

    Please help

    #314608
    David Martin – Support
    Moderator
    Post count: 20834

    1) You should not need to remove the filter first.

    2) Will need your FTP details to see this.

    #314613
    hossein
    Member
    Post count: 4
    This reply has been marked as private.
    #314897
    David Martin – Support
    Moderator
    Post count: 20834

    Please contact your hosting provider and ask for the following:

    – Server
    – Username
    – Password

    I need actual FTP access not web browser.

    Please also add your URL/WP login.

    #314903
    hossein
    Member
    Post count: 4
    This reply has been marked as private.
    #314911
    David Martin – Support
    Moderator
    Post count: 20834

    The sample code is already within the child theme functions.php for your reference. I have updated your code to now work:

    	function hk_atelier_add_to_wishlist_icon() {
    		return '<i class="sf-icon-wishlist"></i><span>Ajouter à la liste</span>';
    	}
    	add_filter('sf_add_to_wishlist_icon', 'hk_atelier_add_to_wishlist_icon', 100);
    	add_filter('sf_wishlist_icon', 'hk_atelier_add_to_wishlist_icon', 100);
    	add_filter('sf_wishlist_menu_icon', 'hk_atelier_add_to_wishlist_icon', 100);
Viewing 12 posts - 1 through 12 (of 12 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