Web 2.0, Php, MySQL, HTML, CSS, Wordpress, Javascript, iTouch iPod, iPhone, Adobe…
8 Jan
I keep forgetting this - good thing i stumbled on this tip on finding the current page slug when you are buliding a wordpress template.
$post_obj = $wp_query->get_queried_object();
$post_ID = $post_obj->ID;
$post_title = $post_obj->post_title;
$post_name = $post_obj->post_name;
Tags: Wordpress

Leave a reply