Wordpress get page slug


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $post_obj = $wp_query->get_queried_object();
  2. $post_ID = $post_obj->ID;
  3. $post_title = $post_obj->post_title;
  4. $post_slug = $post_obj->post_name;

URL: http://wenderhost.com/2007/08/09/wordpress-tip-find-the-current-page-slug/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.