The MU forums have moved to WordPress.org

Setting different default category for each theme (hard coded) (6 posts)

  1. edagan
    Member
    Posted 12 years ago #

    Hi Folks,

    Ultimately what I'm looking for here is a line (or lines) of code, and where it (they) go.

    I'm setting up different themes, one for each political party, for use by my WPMU end-users.

    What I want to achieve is a way in which I can, for example, set a hard-coded category so that if a user selects the Labour Party theme, a category named "Labour" is hardcoded for that theme.

    Obviously I would like the user to be able to add their own categories, but this fixed pre-coded category should stay, and be assigned to all of that user's posts/pages.

    Can you help?

    Thanks,

    Danny.

  2. mercime
    Member
    Posted 12 years ago #

    Some modifications might be required, but this looks good http://wordpress.org/extend/plugins/blog-topics/

  3. edagan
    Member
    Posted 12 years ago #

    Thanks so much - I'll play around with it, and see if I can use it to solve the problem.

    If anyone else has any ideas please do let me know.

    Thanks,

    Danny.

  4. DeannaS
    Member
    Posted 12 years ago #

    The blog topics plugin isn't going to do anything with categories for posts/pages. It creates a sort of meta-category applicable to the whole blog. Depending on what you want to do with the categories that might work for you though. The version that's out there hasn't been tested on 2.9. But, I'm working on updates and will have something out in the next day or so.

  5. andrea_r
    Moderator
    Posted 12 years ago #

    If you wanted it dependent on the theme they've chosen, you'll be better off sticking the "add category" code right in the theme's functions.php file.

  6. mercime
    Member
    Posted 12 years ago #

    Well yes, I jumped the gun :-) What DeannaS and andrea_r said :-)

About this Topic