Snippets Collections
<!-- Get all tags displayed -->
    <nav class="all-tags">
        <ul>
            <?php
                $tags = get_tags('post_tag'); //taxonomy=post_tag
        
                if ( $tags ) :
                foreach ( $tags as $tag ) : ?>
                    <li class="tags">
                        <a href="<?php echo esc_url( get_tag_link( $tag->term_id ) ); ?>" 							title="<?php echo esc_attr( $tag->name ); ?>">
                        <?php echo esc_html( $tag->name ); ?>
                        </a>
                    </li>
                <?php endforeach; ?>
            <?php endif; ?>
        </ul>
    </nav>
star

Sat Jun 25 2022 11:52:14 GMT+0000 (UTC) https://stackoverflow.com/questions/39685167/list-all-the-tags-in-a-wordpress-blog

#wordpress #tags

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension