0

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.

3
  • 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. Dec 14, 2012 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.
    – fuxia
    Jan 11, 2013 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. Jan 14, 2013 at 7:47

1 Answer 1

0

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.

1
  • wp-content.php? Where exactly does that file reside?
    – kaiser
    Jan 14, 2013 at 13:55

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