Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress get current category slug

$category = get_category(get_query_var('cat'));
echo $category->slug; 
// Echo the category slug of default taxonomy (Category)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #wordpress #current #category #slug
ADD COMMENT
Topic
Name
1+1 =