WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Parent-child relationship in MU (7 posts)

  1. jpilantrose
    Member
    Posted 3 years ago #

    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.

  2. 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....)

  3. jpilantrose
    Member
    Posted 3 years ago #

    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.

  4. 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?

  5. jpilantrose
    Member
    Posted 3 years ago #

    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]
  6. 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.

  7. jpilantrose
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.