Jump to content

Wordpress tags (insert something before)


bondigor69

Recommended Posts

hello guys I have this code from wordpress CODEX

 

http://codex.wordpress.org/Function_Reference/get_the_tags

 

<?php
$posttags = get_the_tags();
if ($posttags) {
  foreach($posttags as $tag) {
    echo $tag->name . ' #';
  }
}
?>

 

And I split the tags with #

 

And there is the tags (wordpress #codex #howto #blabla #)

The dash separates the tags!!!

How can I put the # before each Tag instead separating the tags with the dash

 

Link to comment
https://forums.phpfreaks.com/topic/264300-wordpress-tags-insert-something-before/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.