Posted By

S_Park on 07/30/10


Tagged

wordpress slug


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

osirisinternet


Wordpress: Slug as string


 / Published in: PHP
 

URL: http://www.insitewebsitedesign.com/wordpress-post-slug-and-page-slug-function

  1. <?php
  2. $post_data = get_post($post->ID, ARRAY_A);
  3. $slug = $post_data['post_name'];
  4. echo $slug;
  5. ?>

Report this snippet  

You need to login to post a comment.