Created
October 31, 2022 16:23
-
-
Save someguy9/986ef956366822c773f0b05198f3484d to your computer and use it in GitHub Desktop.
Get the current post slug in WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $post; | |
$slug = $post->post_name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment