Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In WPMU, we are using Site Categories (with Sitewide Tags), but for the life of me I can't see how the category of the sub-site (say, departments in a school) to which each blog belongs ends up in the posts. (Well, it doesn't. I've listed out the metadata from the database and checked the post data, categories (...), terms, and tags also. Site Categories puts nothing there.)

It's probably not supposed to, but the problem I'm solving is giving posts collected to the main site an icon corresponding to the category of the site it was blogged under.

The Types plugin does this, but the category would be visible and selectable for each post the blogger posts. Instead, this value should be set to the site category once when the site is created and never seen by the bloggers.

How do I do this?

I could settle for saving an extra category with all posts on a site, but as I see it if a plugin does this it would have to have different settings on each site.

share|improve this question

closed as too localized by kaiser, s_ha_dum, toscho Jan 14 '13 at 15:34

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Possibly, I could settle for making child-themes with register_taxonomy with some term, and set it to not be visible in admin. There are only two categories at the moment (in other words, 'two types of blogs'). Would that work? Seems like a workaround. –  Henrik Erlandsson Dec 14 '12 at 16:00
    
There are no site categories in WordPress multi-site. Are you using a plugin? If so, please add a link to the source code to make answers possible. –  toscho Jan 11 '13 at 20:53
    
Yes, these plugins are available via the WP plugin site. Pasting a plugin's worth of code would get old quickly I think ;) The site is finished and the project budget did not include us developing a custom plugin for them, or the problem would not have appeared. –  Henrik Erlandsson Jan 14 '13 at 7:47

1 Answer 1

up vote 0 down vote accepted

Site Categories is only a tool for categorizing blogs and together with Sitewide Tags allows for copying sub-blog posts to a top level blog of a certain category and list out posts from certain blog categories. However, no categorizing data is copied with the posts, or linked to the posts via metadata - except the blogid.

We ended up writing a snippet in content.php that looks up the blogid of the post, and then looks up the name of the theme the blog uses from the wp_options tables in the WP database.

That let us style by category, since the blog of a certain category inherited the child theme for its category.

share|improve this answer
    
wp-content.php? Where exactly does that file reside? –  kaiser Jan 14 '13 at 13:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.