Forums

[resolved] PHP: Get post slug? (4 posts)

  1. onecrumb
    Member
    Posted 3 years ago #

    How do I get the slug URL of a post? Just the name of the function is all I need.

    Thank you.

  2. ianternet
    Member
    Posted 3 years ago #

    i need this as well - anyone with an idea? my brain hurts too much from over thinking and reading wordpress... any one has insgihts?

  3. jstnjns
    Member
    Posted 2 years ago #

    Has anybody figured this out?

  4. Mark / t31os
    Moderator
    Posted 2 years ago #

    Inside the loop..
    <?php echo $post->post_name;?>

    Maybe misleading i know, but that does refer to the slug of the post..

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags