• shards

    (@shards)


    There’s a lot of info on support pages about using child themes to make edits. I’ve set one up with a style-sheet. It’s activated and uses @import url(“../twentyeleven/style.css”) to load the parent theme. So far so good. But I can’t find any info about how to REMOVE code, rather than to add code.

    For example, I’ve removed the search form: <?php get_search_form(); ?> from the header but had to do that in the parent theme because I couldn’t figure out how you do that in the child theme? Is the idea to add php functions and then add something to invalidate the function?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael

    (@alchymyth)

    how to REMOVE code, rather than to add code

    with templates, you will need to create copy of the template in the child theme, possibly using FTP.
    with styles, you will need to find a way to overwrite the formatting.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    For any PHP file you want to modify copy it from the theme and paste it into your Child Theme directory (apart from functions.php).

    Then you can modify that file from within your Child Theme and do what you want with it.

    Thread Starter shards

    (@shards)

    Thanks to you both. I copied a php file (footer) in cpanel from themes/twentyeleven to themes/twentyeleven-child and modified it. It worked perfectly. So, I will continue to copy php files to child as needed. The functions php file -the reason for not copying this would be because it only works within the parent theme perhaps?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    So, I will continue to copy php files to child as needed

    Yep. See this for the functions.php file http://codex.wordpress.org/Child_Themes#Using_functions.php

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘theme/child’ is closed to new replies.