WordPress.org

Support

Support » How-To and Troubleshooting » Page slug template tag?

Page slug template tag?

  • Is there a template tag to display the page slug? If not, does anyone know of a workaround to get one? I tried a few things but none of them worked.

    I’m using WordPress to manage a downloads section on my site, and I’d like to name each of the downloads “page-slug.zip” (where page-slug is the actual page’s slug) and then call them up through the template. (Each download has its own page.) So far, using <?php the_ID(); ?> is the only thing that works, but that results in my having to name my zip files 435.zip, etc. which isn’t ideal.

    Any ideas? Thanks in advance! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Page slug template tag?’ is closed to new replies.
Skip to toolbar