Support » How-To and Troubleshooting » [Resolved] Get permalink/slug?
8 years, 2 months ago
New to using WP, well new again…
Is there a way to get the permalink/slug to use as as ID?
<h1 id="<?php the_permalink('title_only'); ?>"><?php the_title(); ?></h1>
and it would return
<h1 id="a-short-title">A Short Title</h1>
<h1 id="<?=$post->post_name?>"><?php the_title(); ?></h1>
Excellent! Thank you, thank you, and thank you.