New Blog Template Plugin not working

The blogs are not keeping all of the settings for my template when they are created.
The Banner settings and the site width settings are not holding the values from the template on the newly created
site. Please help.

original template site:
http://fissionsites.com/template/

New site generated (supposed to be the same as original template site)
http://fissionsites.com/testsite2/

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    That is quite the theme there. Over 300 options! Woah.

    Do you know where the theme options are being stored in the database? If they're all being stored the same way it doesn't make sense that certain ones would be copied over and others would be ignored.

    I'm wondering if something about the banner and site width settings is different from the others.

    The test site seems to be loading the default style.css whereas the template has style_7.css loading. I'm not sure where that value is recorded for this particular theme, but as long as it's not creating custom tables or a value that checks for installation you shouldn't have any trouble.

    Let us know if you can find more information about where the theme data is stored, if not we may need to look at the theme itself in order to diagnose the issue.

    Hope this helps. Thanks!

  • imcmg
    • WPMU DEV Initiate

    Mason, it is a great theme for quick customizations and that's why I love it. If I gave you access to the database, do you think you could locate the issue? I want to keep the theme and really need this plugin to work.

    Let me know and I'll work to provide you database access.

    Chad

  • Mason
    • DEV MAN’s Sidekick

    Dug into the theme for a bit today and here's what I found. In the theme header file there is a portion of code that looks for a custom stylsheet related to the blog ID. If it does not find this stylesheet it reverts to the default.

    There's no information to store in the database for this, it's in the theme code. Thus, there's no way for New Blog Template to help.

    What we can do instead is rewrite the conditional statement so that it defaults to the stylesheet you're choosing. I went ahead and did this in the main theme. I changed this:

    if (is_multisite()) {
    $filename = TEMPLATEPATH. '/style_'. $blog_id . '.css';
    if (file_exists($filename)) { ?>
    <link href="<?php bloginfo('template_directory'); ?>/style.css_<?php echo $blog_id; ?>" rel="stylesheet" type="text/css" />
    <?php } else { ?>
    <link href="<?php bloginfo('template_directory'); ?>/style.css" rel="stylesheet" type="text/css" />
    <?php }}

    to this:

    if (is_multisite()) {
    $filename = TEMPLATEPATH. '/style_'. $blog_id . '.css';
    if (file_exists($filename)) { ?>
    <link href="<?php bloginfo('template_directory'); ?>/style.css_<?php echo $blog_id; ?>" rel="stylesheet" type="text/css" />
    <?php } else { ?>
    <link href="<?php bloginfo('template_directory'); ?>/style_7.css" rel="stylesheet" type="text/css" />
    <?php }}

    Ideally, you'd want to make this change within a child theme. Updating your current theme will result in the loss of the customization I've provided here. Putting it into a child theme ensures you'll be able to upgrade the parent theme.

    Let me know if there's anything I can do to assist further.

  • Timothy
    • Chief Pigeon

    Hey there, I hope all is well.

    Just checking in to see how things are going here, its been a short while since we heard from you.

    If you still need further help then please feel free to reopen this thread or create a new one.

    Take care and have a great day! :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.