Advice on how to get my child theme to override the page-template, partials, and js folder

i have the child theme set up and it works as expected for php files and css. but for files in the “sydney-pro-ii/page-template” or “sydney-pro-ii/partials” or “sydney-pro-ii/js”, i have not been able to recreate these paths/files in the child theme and have them override the parent file. any advice on how i can get this to work so i don’t loose my changes? especially for any changes to the js files i wanted to have in the child them but i can’t get the site to use the child version - only seems to use the parent/original version. the js plugin seems to load late and has issues.

Hello,

It looks like it requires close inspection, this goes beyond our support policy, unfortunately. As an option, you can contact Codeable for this kind of service, or find a reputable freelancer on Upwork. Please feel free to ask any other questions that you might have.

Kind Regards, Roman.

Hello there,

Try this PHP code snippets – add it to your child theme’s functions.php file.

    add_action( 'wp_print_scripts', 'sydney_child_dequeue_script', 100 );
    function sydney_child_dequeue_script() {
       wp_dequeue_script('sydney-main');
    }
    add_action( 'wp_enqueue_scripts', 'sydney_child_enqueue' );
    function sydney_child_enqueue() {

        wp_enqueue_script( 'sydney-main-child', get_stylesheet_directory_uri() . '/js/sydney-main-child.js', array('jquery'),'', true );

    }

Then duplicate the sydney/js/main.min.js script to your child theme sydney-child/js/sydney-main-child.js.

Regards,
Kharis

thanks again. actually wondering if you have some code to get widgets/fp-latest-news-type-b.php to work from my child theme. i set up a widget folder and duplicated fp-latest-news-type-b.php there but i am unable to get it to override the parent theme.

Hello there,

Follow the instruction as I explained in this thread. You’d do your own adjustments as different widget file and class name.

Regards,
Kharis

read through that and looks like a good solution. thanks. i might just make the widget by creating a plugin though. i have already set up a few of those and know how to do that.