Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #19205

    Hello,

    I am trying to modify the header.php and footer.php files using a child theme. None of the changes that I make in the child theme work. When I make those changes to the original files, they work. Do child themes not work in the Velvet theme? I would really like to get this child theme working so that all my changes aren’t lost with a theme update.

    Any help would be appreciated.

    Thanks in advance.

    Mark

    #102654

    Hi,

    1) Make a folder called velvet-child and place it next to velvet theme folder.

    2) Create a style.css file inside the velvet-child folder and add the following to it:

    /*
    Theme Name: Velvet's Child
    Description: Child of Velvet
    Theme URI: some-url.com
    Template: Velvet
    Version: 1.0
    Author: you
    Author URI: http://www.some-url.com
    */

    @import url("../velvet/style.css");

    Make sure that capitalization and folder name matched import and template lines.so Velvet VelVet would be different.

    3) Activate child theme as you would any theme in the backend

    4) copy header.php and footer..php and drop them into the child theme folder.

    If you want to test if they work. add

    <?php echo "123zxy"; ?>

    into the header and the footer , and then view source and and do a ctrl-f find for 123zxy.

    Thanks,

    Nick

    #102655

    Thanks Nick. My problem was that I failed to activate the child theme properly. I think I’ve fixed it. However, everything under the theme options have been reset. Is there anyway to import or transfer all my previous settings (to include portfolios, quick CSS, colors, etc.) to the new child theme?

    Thanks again.

    #102656

    Hi Mark,

    No, the options for each theme are saved based on the theme. It would be best and easiest to just re-add in your custom settings.

    Regards,

    Devin

    #102657

    okay, really embarrassingly dumb question, but just to be clear…where you have, in your example, some-url.com, is that that url for the domain, or the location of the theme, or what? And then for the Author URI, same question..the domain again, or what author’s url?

    #102658

    Hi,

    Please download http://www.mediafire.com/file/1sew8jza4twnaw7/velvet-child.zip

    a zip of a child theme for Velvet. Just add it as you would any normal theme. If you are having a problem:

    1) Is the name of the folder of the parent theme ‘velvet’? (capitalization important)

    2) In the parent style.css , is the theme name Velvet?

    The child style.css file just 3 lines are required (lines 2,5, and 11 of stle.css inside the zip file). All other lines are optional, so you can fill them out how you want. You can also just delete the optional lines.

    Thanks,

    Nick

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Velvet Child Theme’ is closed to new replies.