xxxxxxxxxx
$posts = get_posts(array('name' => 'your-posts-name', 'post_type' => 'faq'));
xxxxxxxxxx
$post_id = 123; // Replace 123 with the actual ID of the post you want to retrieve the name for
// Get the post based on its ID
$post = get_post($post_id);
if ($post) {
$post_name = $post->post_name; // Retrieve the post name (slug)
echo "Post Name: " . $post_name;
} else {
echo "Post not found";
}
xxxxxxxxxx
$posts = get_posts(array('name' => 'your-posts-name', 'post_type' => 'faq'));