Way to querry data (tags) from a wordpress database?

Looking at your page the content is empty.

<div class="post_tags"></div>

It seems you aren’t inserting that PHP code correctly into your page. To do so you have to two options:

Without using a plugin.

Add the following code in your functions.php

function list_all_tags( $atts ) {
    $tags = get_tags();
    $html="<div class="post_tags">";
    foreach ( $tags as $tag ) {
        $tag_link = get_tag_link( $tag->term_id );

        $html .= "<a href="https://wordpress.stackexchange.com/questions/308210/{$tag_link}" title="{$tag->name} Tag" class="{$tag->slug}">";
        $html .= "{$tag->name}</a>";
    }
$html .= '</div>';
echo $html;
}
add_shortcode( 'sc_list_all_tags', 'list_all_tags' );

Then, on your page, you will use that shortcode, [sc_list_all_tags] and all the tags will be shown, I just used your code, it works, but the tags are looking a bit ugly, I know you can format them right.


Using a plugin.

You have to install Insert PHP Code Snippet or a similar plugin, in this case you have to add the PHP code snippet on PHPCode Snippets.

enter image description here

In the PHP Code Snippets section you can see all the available snippets (already created).

enter image description here

Finally, you can copy the shortcode of the snippet you want to use and paste into your page.