echo post-permalink without http and www


I have this line …

<div class="permalink"><?php the_permalink(); ?></div>

and the result on my page looks like this …

I guess it could also look like this …

However I’d like to have just without the http:// or www in front of it.

What is the best and easiest way to do so?

Don’t get me wrong, this has nothing todo with rewriting permalinks or whatsoever. Just a simple echo of the_permalink() on my page that is not handled as link but as normal text. And in this case I would like to get rid of the http or www.

mathiregister 1 month 0 Answers 6 views 0

Leave an answer