• Resolved 759017

    New to using WP, well new again…

    Is there a way to get the permalink/slug to use as as ID?

    Like

    <h1 id="<?php the_permalink('title_only'); ?>"><?php the_title(); ?></h1>

    and it would return

    <h1 id="a-short-title">A Short Title</h1>

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get permalink/slug?’ is closed to new replies.