How do I fetch the slug, sans domain, in WordPress/PHP?
August 7, 2006 8:26 PM
Subscribe
Learning my way around WordPress. How do I fetch the slug text, sans domain, in WordPress/PHP?
Neither the docs nor Google seem to have an answer for me.
I don't, for example, want
the_permalink(), which returns a fully-qualified URL. I want
just the slug text, as bolded below:
http://www.domainypants.com/06/07/31/
this-is-the-slug/
I have enough programming acumen to figure out how to strip this out of the larger permalink if necessary, but I'd like to know, definitively, if I need to or if WordPress actually makes this available out of the box.
posted by cortex to technology (5 comments total)
1 user marked this as a favorite
$post->post_nameposted by misterbrandt at 8:39 PM on August 7, 2006