Answers for "wordpress print all categories"

PHP
1

wordpress print all categories

$categories = get_categories();
foreach($categories as $category) {
   echo '<div class="col-md-4"><a href="' . get_category_link($category->term_id) . '">' . $category->name . '</a></div>';
}
Posted by: Guest on June-01-2021

Code answers related to "wordpress print all categories"

Browse Popular Code Answers by Language