WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Multisite Child Theme Issues (8 posts)

  1. U4iC
    Member
    Posted 2 years ago #

    I am currently attempting to migrate my current wordpress blogs to a multisite configuration. The problem I am coming across is that if I make a site lets say called "SITE1" - and attempt to apply a child theme of the twentyten parent. It is looking for http://localhost/SITE1/wp-content/ resulting in a non-styled page (as this directory will not exist). Using the following in the style.css

    @import url('../twentyten/style.css');
    
    /*
    Theme Name: SITE1
    Theme URI: URI to your theme
    Description: Twentyten child-theme with seriously good looks
    Author: Your name and a link to your site
    Version: 0.0.1
    Template: twentyten
    Tags: two-columns, right-sidebar, custom-header, custom-colors, custom-background, custom-menu, theme-options, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style
    */

    even hard-coding the url as @import url('http://localhost/wp-content/themes/twentyten/style.css'); tries to direct to the same place..

    I can not even get to the dashboard now as it can not find any of the style sheets unless i do a reinstall of the wordpress under the SITE1 directory..

    Please help..

  2. @import url('http://localhost/wp-content/themes/twentyten/style.css');

    Try just this instead

    @import url('../twentyten/style.css');
  3. U4iC
    Member
    Posted 2 years ago #

    As stated, I have tried both, but it still tries to look in http://localhost/SITE1/wp-content/themes as opposed to http://localhost/wp-content/themes

    To add: The main blog page is fine, but its when going to any other multi-site created (site1, site2 etc) - It will try and find the css and template files in http://localhost/site1(site2, etc)/wp-content...

    Is there a necessary function needed to check if it is a multi-site, if so, redirect the css import? I am very confused, and have quite a bit of wordpress knowledge.

  4. That's actually okay.

    If your .htaccess is set correctly, then http://localhost/SITE1/wp-content/themes will seamlessly grab files from http://localhost/wp-content/themes

    So what's in the .htaccess, and as this is localhost, is mod_rewrite set up?

  5. U4iC
    Member
    Posted 2 years ago #

    Ok, so adding any site results in an unstyled page with the incorrect link (ie http://localhost/newsite/wp-content/themes/twentyten/style.css), even without changing the theme in dashboard. even rolled back to twentyten on the main page..

    To clearly state the issue: Creating a Site on multisite WP install, The themes do not link to the multisite root, but instead tries to link to the fictitious multisite URL (http://localhost/thissite/wp-content instead of http://localhost/wp-content)

    All sites created can not inherit any .css so I can not even get to the dashboard on them..

    New install, No plugins added, removed custom themes and same issue..

  6. To clearly state my question: What's in your .htaccess file and is mod_rewrite enabled on your localhost installation?

  7. U4iC
    Member
    Posted 2 years ago #

    huge .htaccess.... resolved.. thnx!

  8. U4iC
    Member
    Posted 2 years ago #

    There we go, I had to use the .so extensions instead.. You pointed me on the right track. Will have to remember that little bit when deploying..

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.