Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

User:Firas/Paths

HTTP Paths vs Filesystem Paths

The type of path you want--the path in the filesystem, or through a webbrowser--is usually unambigous depending on your task.

HTTP Paths

You use HTTP Paths for:

  • Linking to things in a webpage
  • Referring to CSS and Images in a webpage

Usually, any file you access through your browser is accessed through an HTTP path.

PHP way to find the HTTP Path of the current file:

Filesystem Paths

In the context of WordPress, you usually need Filesystem Paths only to include() php files.

PHP way to find the Filesystem Path of the current file:

<?php echo dirname(__FILE__); ?>

Relative vs Absolute Paths

Explain here.

WordPress Paths

WordPress Core

HTTP: get_bloginfo('wpurl')

WordPress Index

HTTP: get_settings('home') ? <-- check this. bloginfo have anything relevant?