WordPress.org

Ready to get started?Download WordPress

Forums

Get slug in header (1 post)

  1. thomask
    Member
    Posted 7 years ago #

    Please what is (is there) any variable, which I can use to get slug in header template? I could do it probably by deleting everything before last "/" from the page address (so example.com/this-is-my-article -> this-is-my-article or example.com/tag/category-name -> category-name) but i wonder that this is not the standard way and that it must be somewhere reachable (i would prefer to not make new database query - run the loop again in header)

    thx

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags