• My son started a site using Simple, adding images and content in the Frontpage Featured, About, Testimonial, etc. sections. I suggested he create a child theme to avoid problems when Simple gets updated.

    After creating child theme using One-Click Child Theme plugin, images and content added to site do not appear. Instead, child theme uses original content included with theme.

    What’s needed to create a child theme of Simple that will use content already added?

    Thanks in advance for help or advice.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author NimbusThemes

    (@nimbusthemes)

    Hi there, thanks for reaching out. I am happy to assist.

    A theme’s options are stored based on the theme folder name. Since you created a child theme, the options now get stored as the new name. You would need to rewrite/modify the function nimbus_get_option so that it fetches the parent theme option in case it already exists. It would probably entail something like this:

    
    $parent_theme = get_template_directory();
    $parent_theme_slug = basename($parent_theme);
    $parent_theme_mods = get_option( "theme_mods_{$parent_theme_slug}");
        
    if (!empty($parent_theme_mods) && isset($parent_theme_mods[$key])) {
        $value = $parent_theme_mods[$key];
    }  else {
       $value = get_theme_mod($key);
    }
    
    Thread Starter westonjeff

    (@westonjeff)

    Thanks for quick reply. Tried adding code you supplied to functions.php of child theme without success.

    Site errors out, saying I can’t load the “nimbus_get_option” function twice (guess once from parent, once from child?)

    So, question is, where should this code be included? If necessary, I could start over, adding options with child theme activated.

    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Child theme not using content?’ is closed to new replies.