- Jibon Bikash Roy
function get_id_by_post_name($post_name) { global $wpdb; $id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name = '".$post_name."' AND post_status='publish'"); return $id; }
No comments:
Post a Comment