/ Published in: PHP
URL: http://wenderhost.com/2007/08/09/wordpress-tip-find-the-current-page-slug/
Expand |
Embed | Plain Text
$post_obj = $wp_query->get_queried_object(); $post_ID = $post_obj->ID; $post_title = $post_obj->post_title; $post_slug = $post_obj->post_name;
Comments
Subscribe to comments
You need to login to post a comment.

what version of wordpress does this apply to? does it have to be "inside the loop"?
Nice! Thank you!