Changes made in child theme not working

Hi, 

I'm having troubles changing the content-post.php file that is located in includes folder. 

Initially I have made changed directly in the theme itself but then I realised that doing all the changes in child theme is more correct. 

Now I'm truing to make changes in the file mentioned above, I copied the folder and the file to child theme correctly, but it's not working as it should. 

I made changes on other files like page.php and footer.php and it was OK. 

Is there anything I'm missing or what's going on with the child theme?


Comments

  • Not sure if I'm correct or not but it looks like the child theme allows me to change the files located in the theme directory, but when I want to edit something that is located in a sub-folder - for example includes/content-post.php it just don't see it. 
  • Hi,
    Please be familiar with this documentation:
    https://codex.wordpress.org/Child_Themes

    Remember to load the function in functions.php,
    The system must know what files were changed.

    Thanks
  • Thanks for your help.

    Can you please write down an example of what should I add to funcions.php in child theme to include pages that are located in includes/content-post.php?

    Thanks
  • Unfortunately, I cannot write scripts due to Item Policy, it says:
    Item support does not include services to modify or extend the item
    beyond the original features, style, and functionality described on the
    item page. For customization services that will help you tailor the item
    to your specific requirements, we recommend contacting the author to
    see if they privately offer paid customisation services or checking out
    the great service providers on Envato Studio

    All explanation of Child Theme functionality is inside the link I sent you in the previous post.
    Thanks
  • Hi, 

    I understand the policy and all that. 

    I've tried this in the functions.php file of the theme: 

    require_once( get_stylesheet_directory() . '/includes/content-post.php' );
    require_once( get_stylesheet_directory() . '/functions/theme-shortcodes.php' );

    In the link that you provided, that's the way how yo should include the files you want to edit. If I do this, I get an error. 

    I just needed a tip, an example for 1 of the files.
  • You cannot do that, the child theme modifications are only applied to wordpress files like:
    functions.php, style.css, header.php, page.php etc.

    Files from the theme will not get included. You can, for example, copy and modify a function from 'theme-shortcodes' and paste it into functions.php file. It will get read instead of the function from the original parent file.
  • Hi Bryan, 

    Now we are speaking ;) 

    Thanks for the idea. 

    Strange that your theme doesn't allow modifications of template files. I'm working with another theme and in the case of that one, it works just fine. I just need to re-create the folders like they are in the parent theme. 

    I'll try your suggestions and will come back if I have any troubles.

    Thanks again.
Sign In or Register to comment.