WordPress.org

Ready to get started?Download WordPress

Forums

Delicate
[resolved] creating a child theme (19 posts)

  1. atifishaq
    Member
    Posted 1 year ago #

    Hi,
    I have made a number of changes to the delicate theme and am now trying to create a child theme following the instructions found here: http://codex.wordpress.org/Child_Themes

    But when I click on live preview I am not seeing anything on the right hand window pane and the additional features of the parent theme e.g. theme options, colour options etc are not being displayed in the child theme on the left either.

    Can someone please advise what additional info/files need to be put in the child theme folder to have this working before I update the parent theme?

    Many thanks,

    Atif

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Can you post a link to your site?

  3. atifishaq
    Member
    Posted 1 year ago #

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Right now, the child theme is not active on your site - you need to actually switch to it -- like switching to any other theme. Is it showing up as a theme in your dashboard?

  5. Ryann Micua
    Member
    Posted 1 year ago #

    The only required files for a stylesheet is the style.css file and at the minimum it should only contain the following code:

    /****************************************************
    Theme Name: Delicate Child
    Theme URI:
    Description:
    Author:
    Author URI:
    Template: delicate
    Version: 1.0
    Tags: 
    
    *******************************************************/
    
    @import url("../delicate/style.css");
  6. Ryann Micua
    Member
    Posted 1 year ago #

    The child theme doesn't need to be active to preview it ;) you just need to have the right code in the child style.css file.

  7. atifishaq
    Member
    Posted 1 year ago #

    Hi Yogi,
    I have not made it active yet as want to make sure it will work OK before I swap over, hence trying the Live Preview but that isn't displaying anything. It is displaying in my dashboard as a theme.

    Thanks,

    Atif

  8. atifishaq
    Member
    Posted 1 year ago #

    Ryann - thanks. My only problem is that I cannot recall all the changes I made to the parent theme so need some method of copying over the changes to the child theme.

    At present I have coped across the whole content of the parent style.css file (bar the commented section at the top) and placed that below the code you mention above.

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Doing that is not ideal - you will have duplicate CSS code and it will be much harder to keep track of what you have changed. You could use a text editor to compare an unchanged version with your version - it should fairly easily find the differences.

    That said, it should not create problems with the child theme working, so double check the set-up you have - the child theme style.css header and file structure.

  10. WPThemes.co.nz
    Member
    Posted 1 year ago #

    what you need is a way to find the changes from the parent style.css and the edits you made to the parent style.css before thinking of implementing your changes as a child theme.

    what you need is a "diff tool". basically, you feed the original version and the edited version and it will show you the differences between the two.

    You can try any of the following:
    http://www.diffnow.com/
    http://www.quickdiff.com/
    http://www.diffchecker.com/

    any of these should get the job done.

  11. atifishaq
    Member
    Posted 1 year ago #

    Thanks Yogi - I plan to compare the two when I have a little more time but as you pointed out should not stop the child theme from working. I have checked the header and file structure which seems to be OK so not sure where the problem lies. I have posted it below for reference:

    [Complete stylesheet moderated, Please just post a link to your site.]

  12. WPThemes.co.nz
    Member
    Posted 1 year ago #

    Template: qla should be Template: delicate the folder name of your parent theme.

  13. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    I can't look at it unless you activate the child theme -- doing so won't mess up your site.

  14. atifishaq
    Member
    Posted 1 year ago #

    just activated it.

  15. atifishaq
    Member
    Posted 1 year ago #

    well tried to but said it was broken so changed itself to the default theme :(

  16. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Twentytwelve is active - but if the above comment by wpthemesnz is correct, that's the problem.

  17. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Okay, so post just the top section of the child theme stylesheet here -- only through the @import line -- and be sure to use the backticks or code button. (Don't post the entire stylesheet per the forum rules.)

  18. atifishaq
    Member
    Posted 1 year ago #

    wpthemesnz - thank you! cant see the woods through the trees. changed the template and can now do a live preview. Will have a look at the links you posted and try to sort through the code.

    WPyogi - thank you for your help too :)

  19. WPThemes.co.nz
    Member
    Posted 1 year ago #

    You need to change your theme header to:

    /****************************************************
    Theme Name: Delicate Child
    Theme URI:
    Description:
    Author:
    Author URI:
    Template:    delicate
    Version: 1.0
    Tags: 
    
    *******************************************************/
    
    @import url("../delicate/style.css");

    take note of the value to Template. It should point to the folder name of your parent theme, not to your child theme.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic