WordPress.org

Ready to get started?Download WordPress

Forums

Multisite Themes
[resolved] It does not work on WP 3.0 multisite (6 posts)

  1. Avram
    Member
    Posted 4 years ago #

    Hi,

    I installed the plugin and activated it for whole network, then created folder wp-content/ms-themes/2/ and uploaded theme folder there, but when I open wp-admin/ on that site (with id 2) I can't see new theme under "Themes"

    Any ideas?

    http://wordpress.org/extend/plugins/multisite-themes/

  2. Daniel Bachhuber
    Hand Built
    Posted 3 years ago #

    Hey Avram,
    The $current_site global variable apparently doesn't exist in WP 3.0 anymore. If you replace references to it with $blog_id, the plugin seems to work fine. Also, you'll need to instantiate the global $blog_id variable at the top of the function.

    Hope that helps!

    Cheers,

    Daniel

  3. Daniel Bachhuber
    Hand Built
    Posted 3 years ago #

    Hey Avram,
    I figured something else out as well. At the top of the file, I think that hooking into 'init' is the wrong place. This plugin needs to be wholly activated before any theme material is loaded. As such, I've changed it so that the new theme directory is registered as soon as the plugin is loaded. You can just change the hook to 'plugins_loaded'

    Cheers,

    Daniel

  4. Diego Betto
    Member
    Posted 3 years ago #

    Tnx Daniel,

    worked for me.

    @Avram, also remember:
    - you need to enable the theme, as Superadmin, in Super Admin -> Themes.
    - there is no need to activate the plugin network wide.
    - no need to include the plugin in "Exclude Plugins" plugin page.

  5. maveseli
    Member
    Posted 3 years ago #

    Hi

    Please, can you somehow provide modified version this plugin which works for wp 3.0.1. or at least give some more detailed info how to make it run.
    I have tried above mentioned process but cant get it to work.

    Thanks in advance
    Marko

  6. Maxaud
    Member
    Plugin Author

    Posted 3 years ago #

    Hey guys, sorry for me coming in late on this.
    Didn't see this post until now.

    I want to make sure you guys understand what this plugin does.

    It creates directories that you can place themes in that make them available only to certain networks.

    By default WordPress already allows you to define only certain themes on a per blog/site basis so why create a plugin that does the same thing?

    Most people don't have a Multi-Network environment. A multi-network environment would basically have multiple instances of WordPress Multisite. You would most likely not need this plugin unless you have one of the following plugins installed or you have set this up yourself:
    http://wordpress.org/extend/plugins/wp-multi-network/
    http://wpebooks.com/networks/
    (domain mapping is usually common in this environment as well)

    If you check for the global variable $current_site you will see information related to the current Network. At least it's there on my WP 3.0.1 that has a couple dozen networks on it with this plugin working as it should. I have it placed in the "/wp-content/mu-plugins/" directory. Plugins in this directory get loaded acorss the whole WordPress install and are activated by default. They cannot be deactivated unless they're removed from the directory.

    Some of this confusion is caused by the change in naming start at 3.0 when what used to be called "Sites" was changed to "Networks" and "Blogs" were changed to "Sites" with the integration of WordPress MU and regular WordPress.

    Daniel, I appreciate the input on the plugin action hook and made the changes and mentioned you on the changelog for the 1.3 release even though I wasn't encountering any issues with the init hook.

    If you guys are still having issues with the plugin working as it should in a multi-network WordPress deployment, please let me know.

    Maveesli, to allow only certain themes to a specific site. Upload the theme to the /wp-content/themes/ directory but don't activate it network wide. Go to "Super Admin > Sites" and edit the blog/site you're wanting to allow that specific theme. On the right hand side you will see a list of themes. Select the checkbox next to the theme you want to allow that blog/site to use and click "update options."

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic