How to get Categories Slug Name?

<?php
// Get Categorie Slug Name
function get_cat_slug($cat_id) {
$cat_id = (int) $cat_id;
$category = &get_category($cat_id);
return $category->slug;
}
?>

<div><a href=”http://www.yourdomain.com/category/<?php echo get_cat_slug(8); ?>”>View All</a></div>

that’s all. ЁЯЩВ

Leave a Reply

┬й 2020 Spirituality