Get Category Slug
-
Is there a way to retrieve the category slug? I would like to use it in place of <?php echo $category_nicename; ?> below.
<?php if (is_home()) query_posts("showposts=10&cat=3"); ?> <?php if (have_posts()) :?> <?php $category = $wp_query->get_queried_object(); $cat_name = $category->name; ?> <div class="right_header"><span class="right_header_text"><a href="<?php echo get_settings('home'); ?>/index.php/category/<?php echo $category_nicename; ?>"><?php echo $cat_name; ?></a></span></div>
- The topic ‘Get Category Slug’ is closed to new replies.