I was wondering if there is any WordPress function out there which returns the slug of a category by passing it’s name.
Something like:
http://blog.com/categoryName/slug
Or anything like that.
Thank you!
I was wondering if there is any WordPress function out there which returns the slug of a category by passing it’s name.
Something like:
http://blog.com/categoryName/slug
Or anything like that.
Thank you!
You must be logged in to post a comment.
This retrieves category object by category slug. It returns false if not found.
This should work:
where “category” is the name of the category.