wordpress php get site url code example
Example 1: wordpress get domain
// WORDPRESS GET SITE URL:
echo get_site_url(); // echo's http://www.yoursitename.com
Example 2: current url wordpress
global $wp;
echo home_url( $wp->request )
// WORDPRESS GET SITE URL:
echo get_site_url(); // echo's http://www.yoursitename.com
global $wp;
echo home_url( $wp->request )