• Resolved jpilantrose

    (@jpilantrose)


    Quick question: if I have a reroute in my .htaccess file for index.php -> / will it break the parent-child relationship?

    For some reason, my build is recognizing my child theme as a child theme and retrieving the corresponding stylesheet and images, but it isn’t finding any of the php files inside of the parent directory. I have to copy them all into the child theme for it to work.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Child themes are unaffected by multisite. They work the same as Single Site 🙂

    Is your child theme set up correctly, pointing to the parent theme folder name?

    (Mind, if you named your child theme something like wp-admin I could see it breaking….)

    Thread Starter jpilantrose

    (@jpilantrose)

    I’m pretty sure I’ve set it up correctly. I’ve tried a few different names for the folders and theme (it’s a self-created parent theme), just to make sure I’m not running into issues there.

    Besides the information at the top of style.css and the folder names, no other code should be essential, right?

    My bigger concern is that I have a few custom htaccess calls in the folder. Would any of those affect the parent-child themes?

    Thanks for your help.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Besides the information at the top of style.css and the folder names, no other code should be essential, right?

    You need the import of the old CSS.

    From http://codex.wordpress.org/Child_Themes

    /*
    Theme Name: Twenty Ten Child
    Description: Child theme for the Twenty Ten theme
    Author: Your name here
    Template: twentyten
    */
    
    @import url("../twentyten/style.css");
    
    #site-title a {
        color: #009900;
    }

    My bigger concern is that I have a few custom htaccess calls in the folder. Would any of those affect the parent-child themes?

    Well … in THEORY yes, of course you can totally FUBAR anything with .htaccess 🙂 Can you share what’s in your .htaccess?

    Thread Starter jpilantrose

    (@jpilantrose)

    My htaccess:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    If that’s the WHOLE .htaccess then no, you’re fine there.

    Check for other .htaccess files lurking in your site. Turn off your plugins, etc etc.

    Thread Starter jpilantrose

    (@jpilantrose)

    It’s working now. I believe that the Super-Cache plug-in was playing tricks on me. I felt assured that I’d set it up correctly when I forced it to spit out `print “Parent “.get_bloginfo(‘template_directory’);
    print “Child “.get_bloginfo(‘stylesheet_directory’);`

    I also had to enter the network admin and check the stylesheet and template vars to make sure they were set correctly.

    After some deleting, re-adding, deleting, reloading, etc., it started working. Probably, again, the caching.

    Thanks for your help on this.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Parent-child relationship in MU’ is closed to new replies.