先在自定义字段里建立creator,存放作者信息,然后在需要调用的地方使用下面代码,
if(get_post_meta($post->ID, "creator", true)) { global $id; $creator = get_post_meta($post->ID, "creator", true); $query = 'meta_key=creator&meta_value=' .$creator; $queryObject = new WP_Query($query); .... }
文章评分1次,平均分5.0:★★★★★