Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get slug

You can get that using the following methods:

<?php $post_slug = get_post_field( 'post_name', get_post() ); ?>
Or You can use this easy code:

<?php
    global $post;
    $post_slug = $post->post_name;
?>
 
PREVIOUS NEXT
Tagged: #php #slug
ADD COMMENT
Topic
Name
6+5 =