我用这种方式搜索帖子
$args = array(
\'name\' => $permalink,
\'post_type\' => \'page\',
\'post_status\' => \'publish\',
\'posts_per_page\' => 1
);
$posts = get_posts( $args );
当我将“page1”和“page2”分别放在$permalink
.我怎样才能创建一个查询来处理我要搜索“foo/page2”的情况?
edit 我想获取post对象,以便从中检索一些数据。