Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #110382
    Mike
    Participant

    Hello, is it possible to overwrite other files as style.css in a Child Theme? I´ve tried to make changes in the file “structure.php” at my Child Theme, but nothing works. I want to add 3 links after the copyright text. When i make changes in the Parent-File it works fine. I Have done the following things…

    1. make folder Child-Theme
    2. copy style.css from parent
    3. make changes at header and styles in style.css
    4. create empty file functions.php
    5. filled following text in functions.php

    <?php
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }
    ?>

    So far all is working fine. The changes in style.css from Child-Theme are working.

    Now i tried following..

    1. make folder inc
    2. copy structure.php from parent to child inc folder
    3. make changes in child structure.php

    The changes are not working. When i fill the changes in the parent file it works fine.

    Have i made an misstake?

    #110387
    Mahesh
    Participant

    @bodycontest: All the steps you’ve carried out to make child theme are fine. But you cannot copy structure.php into child theme and modify it. It won’t work. This is not how child theme work. If you want to override the function, you’ll need to copy the very function to child theme’s functions.php and override it there.
    Hope you understand.

    Regards,
    Mahesh

    #110394
    Mike
    Participant

    Ok thank you for the quick answer. I´ll try it.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Child Theme’ is closed to new replies.