1

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?

0

Use parse_url():

echo parse_url( get_permalink(), PHP_URL_HOST );
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.