Why does bloginfo() echo to screen?
-
I am trying to get the ID of a particular post that is replicated onto various blogsites in a network.
The code below works to give me the blog ID, but, the blog URL is shown onscreen. What do I need to change?
I have been unable to get it to work without including the blog URL from bloginfo.
// *********** Begin $target_post_ID = url_to_postid(bloginfo('url') . '/category-slug/post-slug/'); // *********** End
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Why does bloginfo() echo to screen?’ is closed to new replies.