简体   繁体   English

Wordpress更改仅对登录用户可见

[英]Wordpress changes are visible only to logged in users

So here is an unbelievable issue , i am working on wordpress but the problem is if i changes the content in the template file the changes are visible only if the user is logged in . 所以这是一个令人难以置信的问题,我正在研究wordpress,但问题是如果我更改了模板文件中的内容,只有在用户登录时才能看到更改。 no condition in the template . 模板中没有条件。

for try i have created a template check.php and put the content only 尝试我创建了一个模板check.php并只放置内容

<? echo "hieeee" ; ?>

assigned this to a page , first time it shows me the correct content for both conditions, but if i change the content like 将此分配给一个页面,第一次它显示两个条件的正确内容,但如果我更改内容,如

<? echo "hieeee this is update " ; ?>

for logged in user it will show hieeee this is update and for logged out users hieeee can't understand where is the issue . 对于登录用户,它将显示hieeee这是更新 ,对于已注销用户, hieeee无法理解问题所在。

PHP Version 5.5.16 | PHP版本5.5.16 | mysql client 5.0.11 | mysql客户端5.0.11 | SunOS wp1.superhome.com.au 5.11 SunOS wp1.superhome.com.au 5.11

its solved There was a plugin Nginx Helper which store the cache on server. 它解决了有一个插件Nginx Helper ,它将缓存存储在服务器上。 Thanx all for your efforts Thanx全力以赴

This is definility a caching issue. 这是一个缓存问题。 First I thought it was a caching plugin, but it seems like you have full control of that. 首先我认为它是一个缓存插件,但似乎你可以完全控制它。 It worked locally but not on production server, so it had to be something on the server. 它在本地工作但不在生产服务器上工作,所以它必须是服务器上的东西。

Taking a closer look at the phpinfo() you've supplied, superhome host is using Zend OPcache v7.0.4-dev 仔细看看你提供的phpinfo() ,superhome主机正在使用Zend OPcache v7.0.4-dev

You could try to disable the cache temporarily by doing: 您可以尝试通过执行以下操作暂时禁用缓存:

  • If PHP runs as an Apache module, use .htaccess file: php_flag opcache.enable Off 如果PHP作为Apache模块运行,请使用.htaccess文件: php_flag opcache.enable Off

  • If PHP runs as CGI/FastCGI, use .user.ini file: opcache.enable=0 如果PHP以CGI / FastCGI身份运行,请使用.user.ini文件: opcache.enable=0

  • If you have access to php.ini, try to disable it that there. 如果您有权访问php.ini,请尝试在那里禁用它。

UPDATE UPDATE

It seemed you find the actual answer that there was a plugin messing it up, but if someone else stumples upon the same issue this answer might help. 你似乎找到了一个实际的答案,有一个插件弄乱了它,但如果其他人在同一个问题上遇到问题,这个答案可能会有所帮助。

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

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