The MU forums have moved to WordPress.org

Editing allowed_templates (7 posts)

  1. akbigdog
    Member
    Posted 16 years ago #

    Is there a way to disallow use of a theme? I want the main blog to use a theme that pulls information from all the other blogs, but I don't want that theme to be available to each user.

    In the themes folder exist two themes—fbxsquare and fbxsquare_main. I've edited the value for allowed_themes in wp_sitemeta, changing it from the default value to a:2:{s:17:"fbxsquare";b:1;}. But I don't know if that is the correct way to disallow a theme (simply by not including it in allowed_themes).

    How is the best way to disallow a theme to be used?

  2. jaseone
    Inactive
    Posted 16 years ago #

    Do it through Site Admin / Themes, disabled = Yes and then when editing the blog I think it is you can choose to enable/disable themes for particular blogs.

    I plan to use that for 911blogs.com so people can use their own custom theme as I have someone willing to donate their time to create unique themes for our bloggers. :)

  3. akbigdog
    Member
    Posted 16 years ago #

    Ok, that was a dumb question. I always do stuff the hard way... Thanks, jaseone, for responding so quickly.

    Just out of curiosity: what are all those values in wp_sitemeta > allowed_themes? How are they parsed? What are they used for? Couldn't there be a more DBA-friendly way to store that information?

  4. jaseone
    Inactive
    Posted 16 years ago #

    It is a PHP array object stored in the database.

    I'm not quite sure why it is done that way, Iassume to cut down on the number of tables needed for all the little things.

  5. akbigdog
    Member
    Posted 16 years ago #

    Hmm, OK. I'll quit asking questions now. Thanks again for your help.

  6. jonimueller
    Member
    Posted 16 years ago #

    So if one of my users comes to me and says, I want to use my own theme, then I can upload the theme to my site (petdiaries.net), and just ENABLE it only for that person's blog so no other user will be able to use that person's theme? If so, how would I do that in the Site Admin area?

    Thanks, and sorry if the question is silly; I'm not new to WP, but new to WPMU.

    http://petdiaries.net

  7. Farms
    Member
    Posted 16 years ago #

    No worries... is site admin just go to the blog that you want to enable the them for, click on edit and you can do it from there.

    All new themes when uploaded are 'off' by default.

About this Topic