• Resolved maximge

    (@maximge)


    Hi!

    I wanted to make some changes to the fp-call-to-action.php file and upload it to my sydney child theme. So I created a new fp-call-to-action.php file, copied over the original code from the sydney theme, and added the code changes. However, after uploading the file to the child theme directory, the page won’t display the changes.

    On the other hand, if I change the original fp-call-to-action.php file and include the code changes, then everything displays just as I want it to. So the code changes I made are correct. It’s just that the child theme file doesn’t override the original file.

    Could anyone kindly help me? 🙂

Viewing 1 replies (of 1 total)
  • Thread Starter maximge

    (@maximge)

    so i double checked my child theme’s directory structure to make sure it matches the parent theme’s directory. the parent file was in a subfolder, so i created the same subfolder in my child theme’s directory and uploaded the child file in there. I also changed the child theme’s functions.php file:

    <?php
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/widgets/fp-call-to-action.php’ );

    }
    ?>

    still, the original parent theme file is executed when i visit the website. what’s wrong here?

Viewing 1 replies (of 1 total)

The topic ‘Child theme: parent file not overriden’ is closed to new replies.