简体   繁体   English

修复:WordPress页面的一部分无法显示/无法正常工作

[英]FIXED: Part of Wordpress page not showing up/not working

FIXEDI have the following website page: #link It should show posts of shows/movies, compared to the blocks at the homepage: #link FIXEDI具有以下网站页面:#link与首页上的图块相比,它应该显示表演/电影的帖子:

But for no reasons (no updates were done or plugins changed) it stopped working suddenly. 但是没有任何原因(没有完成更新或更改了插件),它突然停止工作。

I looked into the code (there has been some editing to the code), and it probably is one of these lines: 我查看了代码(对代码进行了一些编辑),可能是以下几行之一:

$args = array(
  'post_type'      => 'post',
  'posts_per_page' => -1,
  'post_status'    => 'publish',
  'meta_key'=> 'draaidatum',
  'meta_query'     => array(
    array(
      'key'=>'draaidatum',
      'value'=>date('Ymd'),
      'compare' => '>=',
      'type'    => 'DATE'
    )
  )
);

When i removed this line, the page worked again (but not with the right functionality): 当我删除此行时,页面再次工作(但没有正确的功能):

'posts_per_page' => -1,

Does anyone know what the problem could be? 有谁知道是什么问题?

Try to change 尝试改变

posts_per_page' => -1,

to (for example) 到(例如)

posts_per_page' => 10, 

-1 means shows all of the posts. -1表示显示所有帖子。 There should be a time execution error while it try to show all the posts. 尝试显示所有帖子时,应该存在时间执行错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM