[ad_1]
Hi @anas33chaudhary,
In order to style the output of that code you will need to wrap tag names, for example, in an HTML element with a class so that you can target it with CSS styles.
Here’s an example of wrapping the whole thing in a div and each tag in a span element:
$tags = get_tags();
echo '<div class="tags">';
foreach ( $tags as $tag ) {
if ( $tag->name == 'fill' ) {
continue;
}// do this for every tag you want gone
echo '<span class="tag-name">' . $tag->name . '</span> ';
}
echo '</div>';After making this change you can use a CSS snippet to target those elements, here’s an example using CSS:
.tags {
font-weight: bold;
color: #222;
}
.tags .tag-name {
display: inline-block;
margin-left: 5px;
}Depending on your theme you might need to make the class names more specific to avoid conflicting styles.
You can read more about using CSS in WordPress in this article.
