Exclude custom tags from the_tags

I use the_tags to display my post tags for my WordPress site, I use this code:

<?php the_tags('',' • ',''); ?>

I need to exclude/hide two tags named featured and billed from the printed list. What is the most efficient way of doing this? Please only suggest light solutions, no mental queries that will slow my site which contains thousands of tags and hourly page views.

Related posts

Leave a Reply

1 comment

  1. This is the only way that is simpler and doesn’t load the page I’m thinking of:

    <?php
        $links = array();
        foreach(get_the_tags() as $this_tag) {
            if ($this_tag->name != "featured" && $this_tag->name != "billed"){
               $links[] = '<a href="'.get_tag_link($this_tag->term_id).'">'.$this_tag->name.'</a>';
            }
        }
        echo implode(' • ', $links);
    ?>