问题描述
因此,我创建了一个名为 about-us 的页面,用户可以在其中将要显示的数据放在About-us页面中。
我也不希望在首页上显示相同的数据。如何查询此页面中的数据并显示在首页上。
<?PHP
$args = array(
'post_type' => 'page',//it is a Page right?
'post_status' => 'publish','Meta_query' => array(
array(
'key' => '_wp_page_template','value' => 'template-city.PHP',// template name as stored in the dB
)
)
);
$my_query = new WP_Query($args)
但是我不太了解要取代 template-city 。任何帮助,将不胜感激。谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)