Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #49030

    Joel K
    Participant

    I had a look through the knowledge base and forum and couldn’t find an answer for this:

    I installed X and made it how I wanted it.. and of course I received an email today saying that the theme has an update, and to update it without losing my changes, I need to have used a child theme first – which I didn’t (doh!).

    What’s the best way to do this now? Do I install a child theme now, then update? or will it not work?

    I’m not too experienced in child themes, unfortunately. Any help would be appreciated.

    Also: I only have one CSS modification – there were no edits to the PHP files – only via customizer and settings, etc..

    #49160

    Support
    Member

    Hi Joel,

    If you haven’t touched any files under the main X theme folder then you can proceed and do the update, but we recommend you setup your child theme first. But if you have made changes to your main theme’s files you’ll need to remember them and create a child theme and copy the files and its structure to your child theme folder before proceeding with the update.

    Let me know if that is clear enough.

    Thanks!

    #49166

    Joel K
    Participant

    I think so.

    So basically, I have:
    – Modified within customizer
    – Modified one CSS entry
    – Created posts and pages
    – Created a contact form
    – Changed settings throughout WordPress itself.

    I have not:
    – edited any files via “edit” menu
    – edited any PHP files

    ..I can create a child theme and update, and it’ll be ok?

    #49479

    Rad
    Moderator

    Hi Joel,

    Update will overwrite existing settings and core changes. So before updating, upload a child theme (don’t activate it yet) then :

    1. Backup your customizer setting by exporting it.
    2. If you have any css modification, you have to move it at your child theme’s style.css.
    3. Export your slides in case they were deleted.
    4. Create a list of your menu and widgets setup (switching theme may reset these).
    5. Activate your child theme.
    6. Re import you customizer settings or slides(if became missing).
    7. Re-setup your menu and widgets.

    Then update your x theme and plugins, and you may need to repeat step 6 for same reason.

    Hope this helps.

    #49727

    Joel K
    Participant

    Thanks, it worked :). Maybe you could put this in the Knowledge Base, for other users like myself that were silly enough not to use a child theme from the start.
    Thanks

    #50016

    Rad
    Moderator

    You’re so welcome Joel!

    #700684

    Dorel Extra Bold
    Participant

    Hi there,

    I was very happy to see that i was not the only one who wanted to make a child theme after allready customizing the x theme. I have used the Church demo content and customized my website to my liking. Now i have followed all the steps in this thread but using customizer import/export is giving me problems importing my customize data. When i activate my child theme and try to import the x.export.data i am getting the following error:

    Error importing settings! The settings you uploaded are not for the current theme.

    Is there anything i’m doing wrong? I’ve included my x-child theme css file so u can see if there is anything wrong there. Hopefully there is a solution to my problem.

    Kind regards,

    Arnoud

    #700711

    Rue Nel
    Moderator

    Hello There,

    Thanks for updating this thread!

    The content of your child theme style.css should look like this:

    /*
     Theme Name:   X Child
     Theme URI:    http://groningsperspectief.nl/
     Description:  X Child Theme
     Author:       Dorel Extra Bold
     Author URI:   http://dorelextrabold.nl/
     Template:     X
     Version:      1.0.0
     Tags:         plaats, hier, jouw, tags, gescheiden, door, kommas
     Text Domain:  twenty-fourteen-child
    */
    
    .x-navbar .desktop .x-nav > li > a:hover, 
    .x-navbar .desktop .x-nav > .x-active > a, 
    .x-navbar .desktop .x-nav > .current-menu-item > a {
        box-shadow: 0px 2px 0px 0px;
    }
    
    .x-header-landmark {
        padding: 45px 0;
        background-color: #ffffff;
    }
    
    .x-navbar {
       z-index:99;
    }
    
    body .x-content-dock.right .x-close-content-dock {
        display:none;
    }
    
    .x-content-dock.right {
       right: 0px;
       position:fixed;
       top:0;
       height: 110px;
       z-index:100;
       background: rgba(255, 255, 255, 1);
       align-content: center;
    }
    
    .x-colophon.bottom {
      background-color:#f9f9e2;
      
    }
    
    .x-colophon.bottom .h-widget, .x-colophon.bottom a, .x-colophon.bottom .widget {
      color: #254f9b;
    }

    You do not need this line: @import url("../x/style.css");.

    Please also make sure that you have your child theme’s functions.php file which has this contents:

    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // -----------------------------------------------------------------------------
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    
    // =============================================================================
    // TABLE OF CONTENTS
    // -----------------------------------------------------------------------------
    //   01. Enqueue Parent Stylesheet
    //   02. Additional Functions
    // =============================================================================
    
    // Enqueue Parent Stylesheet
    // =============================================================================
    
    add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
    
    // Additional Functions
    // =============================================================================
    
    

    To assist you better with this issue, would you mind providing us the url of your site with login credentials so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #701148

    Dorel Extra Bold
    Participant

    Hi there,

    I’ve actually managed to fix the problem myself! Thx again for the great service!

    #701330

    Prasant Rai
    Moderator

    Good to hear you figured it out! Let us know if you have any other questions. πŸ™‚

    #745507

    BusinessExpress
    Participant

    Hello

    I just learned what a child theme was today when speaking with someone about wordpress. Nervous that I would loose information before an update I immediately came here, read instruction on how to add the theme to wordress, and immediately activated. But I just read on your forum that I should not have activated it yet. Does this mean I will loose all my information.

    I have :
    – Modified within customizer
    – Modified several CSS entries
    – Created pages
    – Created a contact form
    – Changed settings throughout WordPress itself.
    – uploaded logos, and photos

    I have not:
    – Created posts

    Please advise thank you.

    #745526

    Zeshan
    Member

    Hi there,

    Thanks for writing in!

    It seems you haven’t made any template changes to your parent theme files located under “/wp-content/themes/x/” directory in your WordPress installation.

    Most of the things you mentioned including the changes made in the Customizer are stored in the database so updating your theme or plugins won’t effect them.

    Child theme is only recommended when you want to make template changes. For more information about child theme, refer to our knowledge base article on child theme.

    Also, before updating your theme or plugins, it’s advisable to backup your site to ensure you have a place to restore your site from if something goes wrong.

    Thank you!

    #746096

    BusinessExpress
    Participant

    Okay thanks for such a quick response, but can you explain what you mean by making a template change? I thought by adding CSS since its changing the original design that meant the same. My site is not yet published and you would mot be able to see any of the changes I have made. Can you explain please thanks.

    #746479

    Rad
    Moderator

    Hi there,

    Templates change is when you do some file editing, like x-brand.php, wp-single.php, and etc. This is done through the child theme, and all template customization should be done by FTP.

    While CSS is style customization and different from templates. It can be added through child theme’s style.css or customizer’s custom CSS.

    Thanks.

    #746798

    BusinessExpress
    Participant

    Great thanks.