WordPress.org

Ready to get started?Download WordPress

Forums

How do you build your child theme? (6 posts)

  1. gnzlsdvn
    Member
    Posted 1 year ago #

    I was curious on how everyone is building child themes. Are you creating them and hosting them with "localhost" until you are finished then using FTP? Or are you editing and re-uploading to your webserver? I haven't found a clear answer about this.

  2. Good Guy
    Member
    Posted 1 year ago #

    I prefer to edit the files on my system and then upload them. This way only the changed files are uploaded and in many cases it is only one file - style.css.

    You need to keep a copy on your desktop so that you can edit the files. I have my own mini server running WP, joomla and Drupal so developing, testing and uploading becomes easy. the mini server is only for development work - not for public browsing.

    I never recommend anybody to edit a live website. Very risky.

  3. seinnaidess
    Member
    Posted 1 year ago #

    i just started using child themes. apparently the advantage it that you dont need to edit any of the parent themes original files. also it will preserve your changes should you update your version of wordpress or the theme...something like that. anyways it's really easy to do. just create a folder in the themes file on your server ( wp-content>themes) create a folder and name it whatever you want ex: "twentyeleven_child", then create a style.css file in the folder you just created-done! now when you do to the dashboard.editor you should see the child theme listed. you can edit the style.css from there. In my case i also created other files in the child, like header.php and whatever else would be needed to modify the template. you can go ahead and copy all or parts of the code from the original files and modify from there. you may also need to change the "call" to the style sheet within the header.php file to get it to override the parents css.

    for more info:http://codex.wordpress.org/Child_Themes

  4. s_ha_dum
    Member
    Posted 1 year ago #

    I never recommend anybody to edit a live website. Very risky.

    Agreed. And don't use the built in code editor either.

  5. seinnaidess
    Member
    Posted 1 year ago #

    it's easy enough to edit files without using the editor...but why say dont do it and not the logic behind the warning? just wondering why using the editor is not recommended.....

  6. s_ha_dum
    Member
    Posted 1 year ago #

    One, a forgotten semicolon or a missing quote mark can take down the whole site, and you can't get back to the editor to correct the mistake. You can get in over FTP, but many people don't really realize that since many have never used it. A lot of hosts have installers that install WordPress so everything happens behind the scenes. Browse these forums. There are quite a few threads just like that.

    Two, if you use the editor you are essentially working without a backup. The built in editor encourages that. It is possible to break something and not know about it for hours or days. Backtracking is very difficult at that point. Even if you know about FTP by the time you login you may have forgotten what you did.

    It is really the same logic as for not working on a live site but one step worse. With that editor, not only are you working on a live site but you are working on a live site using tools that are dependent upon that same live site.

Topic Closed

This topic has been closed to new replies.

About this Topic