get_blog_id_from_url


get_blog_id_from_url ( $domain, $path = '/' )

Parameters:
  • (string) domain Website domain.
  • (string) path Optional. Not required for subdomain installations. Default '/'.
Returns:
  • (int) 0 if no blog found, otherwise the ID of the matching blog.
Defined at:
Change Log:
  • M: U

Description

Gets a blog's numeric ID from its URL.On a subdirectory installation like example.com/blog1/, $domain will be the root 'example.com' and $path the subdirectory '/blog1/'. With subdomains like blog1.example.com, $domain is 'blog1.example.com' and $path is '/'.

Related Functions

get_bloginfo_rss, get_blogs_of_user, get_bloginfo, get_blog_count, get_id_from_blogname

Top Google Results

User discussions

wpseek mobile