*

Hugo

  • ****
  • 182 posts
Child theme files
« on: February 13, 2023, 10:36:20 PM »
Hello,

I do experience a problem when I want to create files in my delta_child folder for the following files:
- search.php
- search_gallery.php
- loop-single.php

I can't create a file for these and as a result i need to edit them in the original Delta folder. So when updating I always need to adjust these files again. Is there a solution to overcome this problem?

I can for others such as main.php, item.php, item-post.php, etc

*

MB Themes

Re: Child theme files
« Reply #1 on: February 14, 2023, 01:50:33 PM »
@Hugo
Depends how they are included.
It should be in this way:
Code: [Select]
    include osc_current_web_theme_path_value($filename);

function osc_current_web_theme_path_value should check if file exists in child theme or parent one should be used.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hugo

  • ****
  • 182 posts
Re: Child theme files
« Reply #2 on: February 14, 2023, 01:51:58 PM »
Thank you,

Is this something to check within the file it self? or in another file (if yes: in the Delta or Delta_child)?

*

MB Themes

Re: Child theme files
« Reply #3 on: February 14, 2023, 01:53:10 PM »
Use it like that in both.
Basically this function was created, i.e. if you use:
search_list.php

inside search.php

But you want to update only search_list.php in child theme, and do not want to touch search.php.

So in search.php main theme should use this function to include search_list.php and then in child, you only need to update search_list.php
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots