March 2, 201214 yr Hi. I'm taking my first venture into Wordpress, I'm getting there gradually. I've come to a little problem I can't figure out how to do, I'm sure it's possible though. Basically I want to run the loop and get the_content() from it, the content is a url within a <p> tag. What I would like to do is strip the <p> tags, the "http://"(and "www." if there) and anything after the domain name. For example: from "<p>http://www.thisisamightysite.com/epicpost/uber.php</p>" to "thisisamightysite.com" I'm sure there's something built into php but can't quite get my Google skills to find it Any help would be great. Cheers, ~evu.
March 2, 201214 yr Author I'll check those out now, thanks dude! eD: rd is a winner. Thanks alot. For anyone interested: <?php $content = parse_url(strip_tags(get_the_content())); echo $content['host']; ?> Edited March 2, 201214 yr by evu
Create an account or sign in to comment