To insert code use <code>...</code>.
Directory names for theme and child theme
  • I see that in the new 5.1.8 child theme there is new code for theme directory names.


    $theme = new Theme();
    $options = include(get_template_directory() . '/framework/info.php');
    $options['theme_child_name'] = 'Striking Child';
    $options['theme_slug'] = 'striking';

    $theme->init($options);


    I have different names for that directories, so my theme and child theme directory is not as default.

    Do I need tyo change that code in child theme functions.php to match my names ?
    Is there any other piece of code that makes reference to the theme directories names that can give me any conflict and I need to fix?

    Thanks.
  • 4 Comments sorted by
  • Anyone that can advice here ?
  • Hi

    Yes, there is code in the css and php files of the Child Theme that references the "Striking Child".

    The best way to accomplish the changes quickly is to add the child theme to dreamweaver as a website, and then do a global find and replace change of "Striking Child" to whatever you have named your theme.

    I recall that at the very least, it is in the functions.php and style.css files.

    Happy Striking
    Striking Team
    James
  • Can you please list those files ?

    I know this ones.
    striking main
    - style.css

    striking child
    - style.css
    - functions.php

    What are the other ones ?

    Thanks.
  • I found a problem with child functions.

    If I change the code above to this: (my name for the directories)


    $theme = new Theme();
    $options = include(get_template_directory() . '/framework/info.php');
    $options['theme_child_name'] = 'MyName Child';
    $options['theme_slug'] = 'myname';

    $theme->init($options);


    Then all blog post has the featured image inserted in the post itself and as a result I have the same image twice in the post.

    In Archive instead of having the small image floating left, the big full image displays.

    Leaving the names as they are, there is no problem and everything displays correct. As I want it.

    How can I fix that ?

    Thanks.