Show Slug of a Page
Create a custom function like this::
function the_slug() {
global $post;
$post_slug = $post->post_name;
return $post_slug;
}
If you want to show the slug, you can now call the function defined above:
<?php echo the_slug(); ?>
Related Posts
- WordPress Templates
- Show Content of Another Page
- Customize Breadcrumbs for Custom Post Types Using Genesis Framework
- Customize Breadcrumbs for Custom Post Types
- Use FacetWP with the Astra Theme
- Manage MySQL Databases and Users from the Command Line
- Always Show the "Read More" Link When Using the Astra Theme