I wanna show the blog URL instead of the whole post URL in my loop.
The reason is that I use WordPress multiblog with sitewide tags, so on my front-page of the main blog I’m showing the 10 last posts globally. I wanna show the blogdomain the post is coming from.
the_permalink works if I wanna show the whole post-url but I need to cut it down to show only the domain.
Can anyone help me?
Use
parse_url()
:I think your looking for the function
get_site_url( $blog_id );
$blog_id is the ID of the blog where your post is from.
More info: http://codex.wordpress.org/Function_Reference/get_site_url