Tuesday, June 9, 2015

Default WordPress function to get the URL information



Some of the default WordPress function to get the URL information
  •  plugins_url() — Full plugin directory URL (for example, http://php999.blogspot.com/wp-content/plugins)
  •  includes_url() — Full includes directory URL (for example, http://php999.blogspot.com/wp-includes)
  •  content_url() — Full content directory URL (for example, http://php999.blogspot.com/wp-content)
  •  admin_url() — Full admin URL (for example, http://php999.blogspot.com/wp-admin/)
  •  site_url() — Site URL for the current site (for example, http://php999.blogspot.com)
  •  home_url() — Home URL for the current site (for example, http://php999.blogspot.com)
Confused by seeing site_url and home_url?

Here is the explanation. Site_url() will give your exact blog address and home_url() will give you the domain address.
Consider this example, we have hosted our wordpress blog in http://php999.blogspot.com/blog/index.php

Site_url returns => http://php999.blogspot.com/blog
Home_url returns => http://php999.blogspot.com

1 comment:


  1. Hello,

    we provide affordable and result-oriented SEO services, please give a chance to serve you.


    Thanks
    Admin: E07.net

    ReplyDelete

GitHub repository using Git Bash command

  To add a project to a GitHub repository using Git Bash command line, you can follow these steps: Create a new repository on GitHub by logg...