WordPress.org

Ready to get started?Download WordPress

Forums

get slug of page (4 posts)

  1. olemskoi
    Member
    Posted 6 years ago #

    Hi there,

    Can anybody please advice me the best way how to get the slug of current page? And slug of current category?

    Thanks,
    Igor.

  2. moshu
    Member
    Posted 6 years ago #

    "Get" for what? Where? How? Why?
    Explain...

  3. erick_paper
    Member
    Posted 5 years ago #

    Same question from me. Seems WordPress doesn't have a current post slug tag!

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Yes, it does. When you're in the loop:

    global $post;
    echo $post->post_name;

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags