您可以使用get_page_by_title
以匹配所需职位的标题。
$post_name = get_page_by_title( \'Post Title\' );
$vars = array(
\'name\' => $post_name,
\'paged\' => $page,
\'posts_per_page\' => intval($posts),
\'order\' => \'asc\',
\'offset\' => ($offset ? $offset : \'\'),
\'orderby\' => \'title\'
);