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

3 comments:

  1. My friend Suggest me this blog and I can say this is the best blog to get the basic knowledge.Thank you so much for this Selenium Training in Chennai

    ReplyDelete
  2. Thanks for sharing this Informative content. Well explained. Got to learn new things from your Blog on SAP MM.SAP MM

    ReplyDelete
  3. SAP MM,SD, real Time Training in Chennai
    We provides Best SAP MM,SD Training in Chennai wih real time project assistance by our leading Materail Management Consultant.
    For Free Live Demo @ Call to 8122241286.
    www.thecreatingexperts.com
    SAP MM
    SAP SD

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...