title: php strstr function not work in wordpress tag.php file
body: <p>i add following codes in WordPress theme tag.php file</p>
  <pre><code>&lt;?php
      while ( have_posts() ) :
          the_post();
          $title = strstr(the_title(), '|', true);
          $link = get_permalink();
          echo '&lt;a class=&quot;w3-bar-item w3-button&quot; href=&quot;'.$link.'&quot; target=&quot;_top&quot; rel=&quot;noopener noreferrer&quot;&gt;'.$title.'&lt;/a&gt;';
      endwhile;
  ?&gt;
  </code></pre>
  <p>it seems PHP strstr function not working in this file and $title not printed within a tag.<br>
  thanks in advance</p>