Support » Fixing WordPress » get the tags wordpress PHP

  • hello guys I have this code from wordpress CODEX

    $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

Viewing 2 replies - 1 through 2 (of 2 total)
  • example:

    echo '#' . $tag->name . ' ';

    greattttttt thank you
    can you also help me with that

    <strong>Online Price</strong>:$ 20.00<br>
    <span style="color: red;">Your Price</span>:$ 17.91<br>

    I want to get the second price (17.91) without dollar sign and space and ECHO it somewhere else.
    Can someone help me please
    PS every post have the same HTML above only price changing

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get the tags wordpress PHP’ is closed to new replies.