Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/230.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress主页的多个实例_Php_Wordpress_Function - Fatal编程技术网

Php Wordpress主页的多个实例

Php Wordpress主页的多个实例,php,wordpress,function,Php,Wordpress,Function,我们的主页使用以下代码显示特定类别的12篇随机帖子: <?php // The Query global $wp_query; query_posts( array_merge( array( 'cat' => '4320', 'orderby' => 'rand', 'posts_per_page' => 12 ), $wp_query->query ) ); ?> 这很好,但我们的网站现在显示了数百个我们主页的副本 地点: 复制品之一xhttps:/

我们的主页使用以下代码显示特定类别的12篇随机帖子:

<?php
// The Query
global $wp_query;
query_posts(
array_merge(
array(
'cat' => '4320',
'orderby' => 'rand',
'posts_per_page' => 12
),
$wp_query->query
)
);
?>

这很好,但我们的网站现在显示了数百个我们主页的副本

地点:

复制品之一xhttps://www.newbonuses.com/page/999 (卸下x)

如何为我们的主页禁用/page/?它们是我可以添加到函数中的东西吗 或者修改现有的查询

我似乎不知道如何删除该子目录