• Resolved ohyung

    (@ohyung)


    I’ve looked over 100 of these child theme problem forums and have done everything (I believe!) but to no avail. The message, like many, I get is:

    The parent theme is missing. Please install the “gridsby;” parent theme.

    Here is what I have as my style.css code:

    /*
    Theme Name: Gridsby Child Theme
    Theme URI: https://modernthemes.net/demo/gridsbywp
    Author: ModernThemes
    Author URI: https://modernthemes.net
    Description: Gridsby is a pinterest style gallery theme which is a simple way to showcase a beautiful photo collection. Gridsby is responsive and retina ready, and includes an easy method for posting photos to a front page gallery. You can check out the demo at https://modernthemes.net/demo/gridsbywp for a closer look.
    Version: 1.0.36
    License: GNU General Public License v2 or later
    License URI: https://www.gnu.org/licenses/gpl-2.0.html
    Text Domain: gridsby
    Tags: black, white, light, gray, fluid-layout, responsive-layout, one-column, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-menu, featured-images, full-width-template, rtl-language-support, theme-options, translation-ready, photoblogging, front-page-post-form, post-formats
    
    Template: gridsby;
    
    */
    
    @import url('../gridsby/style.css');

    my pathways are follows:

    wp-content/themes/gridsby
    wp-content/themes/gridsby-child

    I’ve done everything I can think of; double checked upper/lower casing, the gridsby theme is activated, tried it in sublime, textedit (made sure it was plain text and UTF-8). I installed gridsby on wordpress online and it works.

    I’m losing my mind over this, any help is welcome!

Viewing 14 replies - 1 through 14 (of 14 total)
  • WordPress takes the Template: line quite literally. It must contain the name of the folder that contains the parent theme, and capitalization and punctuation matters. You need to remove the semicolon at the end; it isn’t necessary anyway, because it’s all considered part of the same comment block.

    Thread Starter ohyung

    (@ohyung)

    Ah, thank you, the semicolon was the problem. For some reason I thought it was a line of code ??

    It’s active, but it looks nothing like the actual website; the content is there but the style isn’t. It doesn’t seem like it’s importing the css properly???

    Can you post a link to your site with the child theme active?

    Thread Starter ohyung

    (@ohyung)

    https://robrusli.website/

    I just put some random posts up so I could see it with content, but you can contrast it with the Gridsby Demo

    thanks!

    On your site, you’ve got curly quotes instead of straight quotes. You should always use a plain-text editor like Notepad to edit your child theme’s files, not a word processor like Microsoft Word.

    Thread Starter ohyung

    (@ohyung)

    Sorry; I understand the need to use a plain-text editor to edit, but what do you mean by curly quotes? Where?

    Thread Starter ohyung

    (@ohyung)

    Yeah also when I inspect elements on the page, there’s no CSS ??

    Not all themes can be used for creating child themes. Some are design for it, some are designed to make it difficult.

    Try copying the functions.php into your local directory and inspect the header.php file of the parent theme to see how it is handling the CSS.

    Also if the parent theme uses CSS files other than styles.css then I think you need to copy them into your child theme too or use functions.php to include them (or hard code it).

    Or just hack the Gridsby theme and don;t worry about updates. Well, you would manually add the theme updates.

    I don’t recommend taking Malachy’s advice. It’s possible to create a child theme of Gridsby

    In your child theme’s stylesheet, in the @import line, the quotes were appearing as curly quotes on the website itself. You need to make sure they are straight quotes.

    Thread Starter ohyung

    (@ohyung)

    Ah I see! For some reason texedit would curl them even with plaintext activated, but when I put it into textwrangler it stayed straight. I believe that fixed it, thank you so much. I’m going to play around with it for a day or two and make sure there are no other issues.

    Thread Starter ohyung

    (@ohyung)

    Hmm, okay, so when I click Custom CSS, Gridsby Theme Details, or Editor, the following pops up:

    Fatal error: Cannot redeclare gridsby_widgets_init() (previously declared in /home/robreorh/public_html/wp-content/themes/gridsby-child/functions.php:90) in /home/robreorh/public_html/wp-content/themes/gridsby/functions.php on line 113

    any clue on what this means?

    Thread Starter ohyung

    (@ohyung)

    oh that’s weird, I removed the functions.php from the child theme and it’s okay again.

    I’m glad to see that you’ve solved that issue. In the future, it isn’t necessary to copy the entire contents of the parent theme’s functions.php to your child theme’s functions.php, as WordPress automatically loads the parent theme’s functions.php. As you’ve seen, it can cause “Cannot redeclare…” errors.

    Thread Starter ohyung

    (@ohyung)

    Everything has been fixed, thank you so much!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Another irritating Child Theme problem’ is closed to new replies.