Snippet
Appache Authors Awk Bash CLI CSS Deployment Design Process Fonts FTP Git Hooks HTML Interface Linux Loop Minimalism MonsterThemes MySQL Object Office Open Source Opinion Outsourcing PHP Post Slug Principles Productivity Python Refactoring SFTP Snippet SQL SSH Subversion SVN Terminal Themes Tutorial Ubuntu Updates Version Control Without a Plugin WordPress XAMPP
-
How to Get Post Slug in WordPress
The post slug is the part of the URL of a post or page at the last section. E.g.: Page: https://wplancer.com/about/Post: https://wplancer.com/2015/09/post-slug-here/ There are two ways to get the slug in WordPress inside the loop. The first way is to access the $post object that is available inside the loop. The second way is to…