PHP difference between home_url() vs get_option(‘home’)

home_url() is faster and secure than get_option(‘home’) – Source

Example using “/” (source):

$url = home_url( '/' );
echo $url;

Output (echo): http://www.example.com/

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *