title: Using the php substr on the_permalink() in WordPress
body: <p>My urls for posts in WordPress looks like this:
  <a href="http://localhost:8888/blabla/book/yes-vi-testar" rel="nofollow noreferrer">http://localhost:8888/blabla/book/yes-vi-testar</a></p>
  
  <p>Using <code>the_permalink()</code> would generate "<a href="http://localhost:8888/blabla/book/yes-vi-testar" rel="nofollow noreferrer">http://localhost:8888/blabla/book/yes-vi-testar</a>" but I want to cut the first 34 characters to get a string like "yes-vi-testar". How do I use php substr in a case like this? I'm confused... I tried</p>
  
  <pre><code>&lt;?php
      $friendlypermalink = substr(the_permalink(), 34);
  ?&gt;
  </code></pre>
  
  <p>but that doesnt do the trick.</p>