How to get blog id from permalink?

the plugin “WDS Multisite Aggregate” store the blog identifier in a meta of the cloned post.
then in the template file wich display the cloned posts, you can retrieve the home url of the original website with that :

$blogid = $GLOBALS["post"]->blogid;
$blog_details = get_blog_details($blogid);
// the home URL is in $blog_details->home

I hope this is what you need because calculating the original post identifier from the permalink consumes considerably more ressources.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)