I need to link to a category in my wordpress site. The following code works, somewhat:
<?php
// Get the ID of a given category
$category_id = get_cat_ID( 'People' );
// Get the URL of this category
$category_link = get_category_link( $category_id );
?>
My problem is that it includes /category/ in the url, which isn’t how my permalink structure is designed. Does anyone know a way around including /category/ in the url it outputs?
I don’t understand what you want to do. Look here Template Tags/wp list categories « WordPress Codex for the template tag for category menus that will include whatever category base you have set. If you want to output the link to a category on the category page itself, then use:
I found a plugin that does work with 2.9:
http://wordpress.org/extend/plugins/wp-no-category-base/
I’m going to leave the question open, though, for those who may know how to solve the problem without a plugin.