Get slug/permalink name for page
-
I was using $posts[0]->post_title to get the name of the current Page, but I really need to get the current slug/permalink. $posts[0]->post_slug doesn’t give me anything (echo $posts[0]->post_slug is empty.)
I’m thinking that categories have slugs, but Pages have permalinks, but I’m not guessing the correct field name. Can anyone help?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Get slug/permalink name for page’ is closed to new replies.