Get permalink and title by post name?

In the theme there is a custom post type called faq

I just want to get certain post by its name (NOT by id cause no id exist).

Read More
<?php query_posts('post_type=faq') ?>

how to get the_tile() and the_permalink() by its name?

Related posts

Leave a Reply

1 comment

  1. $posts = get_posts(array('name' => 'your-posts-name', 'post_type' => 'faq'));
    foreach ($posts as $post) {
        $title = get_the_title($post->ID);
        $permalink = get_permalink($post->ID);
        break; //use this to limit to a single result
    }