url_to_postid() with multisite
-
Hi,
I try to use url_to_postid() on my network but the function always returns 0 (failure).
I know it works only for current blog urls that’s why I use switch_to_blog ().
switch_to_blog ($blog); $id = url_to_postid($url); restore_current_blog();
But nothing changes…
Thanks in advance for your help
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘url_to_postid() with multisite’ is closed to new replies.