Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

0 votes

I am looking for a function to create category links in the wordpress loop for articles

You can use this for single category name with link: $category = get_the_category(); echo '<a href="'.get_category_link($category[0]->cat_ID).'"><img src="'.$category[0]-&...
Rishi Shah's user avatar
0 votes

I am looking for a function to create category links in the wordpress loop for articles

If you're working with term objects or ids, then you can retrieve the category page url with get_category_link(). It is a handy wrapper for get_term_link() as it ensures the return value is always a ...
Antti Koskinen's user avatar

Top 50 recent answers are included