简体   繁体   中英

Difference between bloginfo('url') and bloginfo('wpurl')

What is the difference between

bloginfo('url')

and

bloginfo('wpurl') 

bloginfo( 'url' ) returns the value of the home option in the options table, while bloginfo( 'wpurl' ) returns the value of siteurl .

bloginfo( 'url' ) is akin to calling home_url()

bloginfo( 'wpurl' ) is akin to calling site_url()

Read more in the bloginfo() docs, the codex for site_url() and home_url() , or see This WPSE Answer for the difference between the two functions.

A simple abstract from that answer would be:

The site_url() [… the value from bloginfo( 'wpurl' ) …] will always be the location where you can reach the site by tacking on /wp-admin on the end, while home_url() [… the value from bloginfo( 'url' ) …] would not reliably be this location.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM