Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #1227134
Child theme not override php files
Closed

Comments

  • cloudnova started the conversation

    Hello there,

    we activate and use "Scalia default child theme" for personalization, but when we copy and edit php files into child folder, they didnt work and not override the original theme php.

    Now i edited the original theme files but isnt a good solution

    the child functions.php include this code:


    <?php
    add_action('wp_enqueue_scripts', 'enqueue_parent_theme_style');

    function enqueue_parent_theme_style() {

    wp_enqueue_style('parent-style', get_template_directory_uri().'/style.css', array('scalia-icons', 'scalia-reset', 'scalia-grid'));

    }

    function scalia_child_user_icons_info_link() {

    return get_stylesheet_directory_uri().'/fonts/user-icons-list.html';

    }

    add_filter('scalia_user_icons_info_link', 'scalia_child_user_icons_info_link');

  •  6,933
    Oliver replied

    HI!

    What files are you trying to change?

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •  2
    Ted replied

    I'm having the same problem. I'm trying to make changes to inc/content.php, but when I put that into the child theme, the new code doesn't override the main theme's code.

  •  6,933
    Oliver replied

    Hi!

    Content.php it's not template, it's not possible to override it in the child theme

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver