On the top of my head there are two easy ways to go about this problem, first is to use the get_the_tags()
function to manually loop the tags to easily insert the hashtags.
$tags = get_the_tags();
if ( $tags ) {
foreach ( $tags as $tag ) {
?>
<a href="https://wordpress.stackexchange.com/questions/225250/<?php echo get_tag_link( $tag->id ); ?>">
<?php echo '#' . $tag->name . ', '; ?>
</a>
<?php
}
}
Another way to do it, but will give you less customisation options is straight up using the the_tags()
function. Here is an example.
the_tags( 'Tagged in: #', ', #' );
The first parameter is what will show before the loop starts, so here you will need to insert the first #
, the second parameter is what will loop after every tag is being output.
You can read up on the functions here:
https://codex.wordpress.org/Function_Reference/get_the_tags
https://codex.wordpress.org/Function_Reference/the_tags
Hope this helped and good luck!