Support » Fixing WordPress » Get permalink/slug?
8 years, 7 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.