The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.
<td>
<?php
$selected_category = get_the_terms(get_the_ID(), \’news_category\’);
if (!empty($selected_category) && !is_wp_error($selected_category)) {
$selected_category_names = array_map(function($category) {
return $category->name; // Note the lowercase \’name\’ property
}, $selected_category);
$comma_separated_names = implode(\’, \’, $selected_category_names);
echo $comma_separated_names;
} else {
echo \’N/A\’;
}
?>
</td>
<td>
<?php
$selected_category = get_the_terms(get_the_ID(), \’news_tag\’);
if (!empty($selected_category) && !is_wp_error($selected_category)) {
$selected_category_names = array_map(function($category) {
return $category->name; // Note the lowercase \’name\’ property
}, $selected_category);
$comma_separated_names = implode(\’, \’, $selected_category_names);
echo $comma_separated_names;
} else {
echo \’N/A\’;
}
?>
</td>
<td>
<?php
$selected_category = get_the_terms(get_the_ID(), \’news_category\’);
if (!empty($selected_category) && !is_wp_error($selected_category)) {
$selected_category_names = array_map(function($category) {
return $category->name; // Note the lowercase \’name\’ property
}, $selected_category);
$comma_separated_names = implode(\’, \’, $selected_category_names);
echo $comma_separated_names;
} else {
echo \’N/A\’;
}
?>
</td>
<td>
<?php
$selected_category = get_the_terms(get_the_ID(), \’news_tag\’);
if (!empty($selected_category) && !is_wp_error($selected_category)) {
$selected_category_names = array_map(function($category) {
return $category->name; // Note the lowercase \’name\’ property
}, $selected_category);
$comma_separated_names = implode(\’, \’, $selected_category_names);
echo $comma_separated_names;
} else {
echo \’N/A\’;
}
?>
</td>
<td>
<?php
$selected_category = get_the_terms(get_the_ID(), \’news_category\’);
if (!empty($selected_category) && !is_wp_error($selected_category)) {
$selected_category_names = array_map(function($category) {
return $category->name; // Note the lowercase \’name\’ property
}, $selected_category);
$comma_separated_names = implode(\’, \’, $selected_category_names);
echo $comma_separated_names;
} else {
echo \’N/A\’;
}
?>
</td>
<td>
<?php
$selected_category = get_the_terms(get_the_ID(), \’news_tag\’);
if (!empty($selected_category) && !is_wp_error($selected_category)) {
$selected_category_names = array_map(function($category) {
return $category->name; // Note the lowercase \’name\’ property
}, $selected_category);
$comma_separated_names = implode(\’, \’, $selected_category_names);
echo $comma_separated_names;
} else {
echo \’N/A\’;
}
?>
</td>
<td>
<?php
$selected_category = get_the_terms(get_the_ID(), \’news_category\’);
if (!empty($selected_category) && !is_wp_error($selected_category)) {
$selected_category_names = array_map(function($category) {
return $category->name; // Note the lowercase \’name\’ property
}, $selected_category);
$comma_separated_names = implode(\’, \’, $selected_category_names);
echo $comma_separated_names;
} else {
echo \’N/A\’;
}
?>
</td>
<td>
<?php
$selected_category = get_the_terms(get_the_ID(), \’news_tag\’);
if (!empty($selected_category) && !is_wp_error($selected_category)) {
$selected_category_names = array_map(function($category) {
return $category->name; // Note the lowercase \’name\’ property
}, $selected_category);
$comma_separated_names = implode(\’, \’, $selected_category_names);
echo $comma_separated_names;
} else {
echo \’N/A\’;
}
?>
</td>
<td>
<?php
$selected_category = get_the_terms(get_the_ID(), \’news_category\’);
if (!empty($selected_category) && !is_wp_error($selected_category)) {
$selected_category_names = array_map(function($category) {
return $category->name; // Note the lowercase \’name\’ property
}, $selected_category);
$comma_separated_names = implode(\’, \’, $selected_category_names);
echo $comma_separated_names;
} else {
echo \’N/A\’;
}
?>
</td>
<td>
<?php
$selected_category = get_the_terms(get_the_ID(), \’news_tag\’);
if (!empty($selected_category) && !is_wp_error($selected_category)) {
$selected_category_names = array_map(function($category) {
return $category->name; // Note the lowercase \’name\’ property
}, $selected_category);
$comma_separated_names = implode(\’, \’, $selected_category_names);
echo $comma_separated_names;
} else {
echo \’N/A\’;
}
?>
</td>