WordPress建站常遇到的几个小问题总结(一)

tbc我最棒 7个月前阅读:3次

  分享学习WordPress中经常遇到的几个小问题:

  1.WordPress后台或前台白屏

  此问题灰常常见,TOM在前文有总结,请看《WordPress前台后台白屏问题》。

  2.WordPress后台无法登陆,登陆进入死循环。

  登陆WordPress后台时不停的返回到登陆界面,进入死循环。关于这一类的网上众说纷纭,实难取证。但经多次测试发现很多方法拿回来不能用,

  最终解决方案如下:

  打开/wp-includes/pluggable.php 找到第666行如下代码:

  setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);

  替换为:

  setcookie($auth_cookie_name, $auth_cookie, $expire, SITECOOKIEPATH, COOKIE_DOMAIN, $secure, true);

  3.WordPress代码变种

  很多朋友应该见到了,经常在别人站复制一些代码的时候或许站长提示我们“请把代码中的全角引号逗号改为半角”或许是复制回来的代码导致网页出错。很多是因为WordPress过于智能,造成代码半角变全角,代码变异变种。

  解决方法:在主题目录的functions.php头部加入以下代码:考必过 kaobiguo.net

  4.WordPress网页错位

  有些朋友可能遇到了,例如网页整体偏左,文章内页侧边栏错位。一般来说网页整体偏左引起的原因主题目录的functions.php比较常见。文章内页侧边栏错位,一般是由Single.php引起,例如在一次在给WordPress添加文章版权声明时代码结束标签

  写成了

  ,结果造成首页正常,所有文章内页侧边栏都跑到最下面。

  5.WordPress代码出错

  一:代码本身错误,例如上文中代码变异,半角引号变全角引号,写代码时丢三落四等等。有些出错后访问时会直接提示你哪一行代码出错,有些则没有不提示但导致网页错位,例如上文。建议在修改代码后,用IE浏览器多打开几个页面,观察IE状态栏是否报错。

  二:代码插入位置错误,由于WordPress主题万千,控制方式也不尽相同,实现同样的功能可能插入代码位置也不同,但大多都是有规可循的,自己多搜集一下。

  上文仅为个人总结,欢迎大家指点错误,谢谢!


























推荐阅读:

http://www.kaobiguo.net/

http://www.kaobiguo.net/news/30063.html

http://www.kaobiguo.net/news/30064.html

http://www.kaobiguo.net/news/30065.html

http://www.kaobiguo.net/news/30066.html

http://www.kaobiguo.net/news/30067.html

http://www.kaobiguo.net/news/30068.html

http://www.kaobiguo.net/news/30069.html

http://www.kaobiguo.net/news/30070.html

http://www.kaobiguo.net/news/30071.html

http://www.kaobiguo.net/news/30072.html

http://www.kaobiguo.net/news/30073.html

http://www.kaobiguo.net/news/30074.html

http://www.kaobiguo.net/news/30075.html

http://www.kaobiguo.net/news/30076.html

http://www.kaobiguo.net/news/30077.html

http://www.kaobiguo.net/news/30078.html

http://www.kaobiguo.net/news/30079.html

http://www.kaobiguo.net/news/30080.html

http://www.kaobiguo.net/news/30358.html

http://www.kaobiguo.net/news/30392.html

http://www.kaobiguo.net/news/30393.html

http://www.kaobiguo.net/news/30394.html

http://www.kaobiguo.net/news/30395.html

http://www.kaobiguo.net/news/30396.html

http://www.kaobiguo.net/news/30397.html

http://www.kaobiguo.net/news/30398.html

http://www.kaobiguo.net/news/30399.html

http://www.kaobiguo.net/news/30400.html

http://www.kaobiguo.net/news/30401.html

http://www.kaobiguo.net/news/30402.html

http://www.kaobiguo.net/news/31509.html

http://www.kaobiguo.net/news/31510.html

http://www.kaobiguo.net/news/31511.html

http://www.kaobiguo.net/news/31512.html

http://www.kaobiguo.net/news/31513.html

http://www.kaobiguo.net/news/31514.html

http://www.kaobiguo.net/news/31515.html

http://www.kaobiguo.net/news/31516.html

http://www.kaobiguo.net/news/31517.html

http://www.kaobiguo.net/news/31518.html

http://www.kaobiguo.net/news/31519.html

http://www.kaobiguo.net/news/31520.html

http://www.kaobiguo.net/news/31521.html

http://www.kaobiguo.net/news/31522.html

http://www.kaobiguo.net/news/31523.html

http://www.kaobiguo.net/news/31524.html

http://www.kaobiguo.net/news/31525.html

http://www.kaobiguo.net/news/31526.html

http://www.kaobiguo.net/news/31527.html

http://www.kaobiguo.net/news/31528.html

http://www.kaobiguo.net/news/31529.html

http://www.kaobiguo.net/news/31530.html

http://www.kaobiguo.net/news/31532.html

http://www.kaobiguo.net/news/31531.html

http://www.kaobiguo.net/news/31533.html

http://www.kaobiguo.net/news/31534.html

http://www.kaobiguo.net/news/31535.html

http://www.kaobiguo.net/news/31536.html

http://www.kaobiguo.net/news/31537.html

http://www.kaobiguo.net/news/31538.html

http://www.kaobiguo.net/news/31539.html

http://www.kaobiguo.net/news/31540.html

http://www.kaobiguo.net/news/31541.html

http://www.kaobiguo.net/news/31542.html

http://www.kaobiguo.net/news/31543.html

http://www.kaobiguo.net/news/31544.html

http://www.kaobiguo.net/news/31545.html

http://www.kaobiguo.net/news/31546.html

http://www.kaobiguo.net/news/31547.html

http://www.kaobiguo.net/news/31548.html

http://www.kaobiguo.net/news/31549.html

http://www.kaobiguo.net/news/31550.html

http://www.kaobiguo.net/news/31551.html

http://www.kaobiguo.net/news/31552.html

http://www.kaobiguo.net/news/31553.html

http://www.kaobiguo.net/news/31554.html

http://www.kaobiguo.net/news/31555.html

http://www.kaobiguo.net/news/31556.html

http://www.kaobiguo.net/news/31557.html

http://www.kaobiguo.net/news/31558.html

http://www.kaobiguo.net/news/31559.html

http://www.kaobiguo.net/news/31560.html

http://www.kaobiguo.net/news/31561.html

http://www.kaobiguo.net/news/31562.html

http://www.kaobiguo.net/news/31563.html

http://www.kaobiguo.net/news/31564.html

http://www.kaobiguo.net/news/31565.html

http://www.kaobiguo.net/news/31566.html

http://www.kaobiguo.net/news/31567.html

http://www.kaobiguo.net/news/31568.html

http://www.kaobiguo.net/news/31569.html

http://www.kaobiguo.net/news/31570.html

http://www.kaobiguo.net/news/31571.html

http://www.kaobiguo.net/news/31572.html

http://www.kaobiguo.net/news/31573.html

http://www.kaobiguo.net/news/31574.html

http://www.kaobiguo.net/news/31575.html

http://www.kaobiguo.net/news/31576.html

http://www.kaobiguo.net/news/31577.html

http://www.kaobiguo.net/news/31578.html

http://www.kaobiguo.net/news/31519.html

http://www.kaobiguo.net/news/31580.html

http://www.kaobiguo.net/news/31581.html

http://www.kaobiguo.net/news/31582.html

http://www.kaobiguo.net/news/31583.html

http://www.kaobiguo.net/news/31584.html

http://www.kaobiguo.net/news/31585.html

http://www.kaobiguo.net/news/31586.html

http://www.kaobiguo.net/news/31587.html

http://www.kaobiguo.net/news/31588.html

http://www.kaobiguo.net/news/31589.html

http://www.kaobiguo.net/news/31590.html

http://www.kaobiguo.net/news/31591.html

http://www.kaobiguo.net/news/31592.html

http://www.kaobiguo.net/news/31593.html

http://www.kaobiguo.net/news/31594.html

http://www.kaobiguo.net/news/31595.html

http://www.kaobiguo.net/news/31596.html

http://www.kaobiguo.net/news/31597.html

http://www.kaobiguo.net/news/21130.html

http://www.kaobiguo.net/news/31598.html

http://www.kaobiguo.net/news/31599.html

http://www.kaobiguo.net/news/31600.html

http://www.kaobiguo.net/news/31601.html

http://www.kaobiguo.net/news/31602.html

http://www.kaobiguo.net/news/31603.html

http://www.kaobiguo.net/news/31604.html

http://www.kaobiguo.net/news/31605.html

http://www.kaobiguo.net/news/31606.html

http://www.kaobiguo.net/news/31607.html

http://www.kaobiguo.net/news/31608.html

http://www.kaobiguo.net/news/31609.html

http://www.kaobiguo.net/news/31610.html

http://www.kaobiguo.net/news/31611.html

http://www.kaobiguo.net/news/31612.html

http://www.kaobiguo.net/news/31613.html

http://www.kaobiguo.net/news/31614.html

http://www.kaobiguo.net/news/31615.html

http://www.kaobiguo.net/news/31616.html

http://www.kaobiguo.net/news/31617.html

http://www.kaobiguo.net/news/31617.html

http://www.kaobiguo.net/news/31619.html

http://www.kaobiguo.net/news/31620.html

http://www.kaobiguo.net/news/31621.html

http://www.kaobiguo.net/news/31622.html

http://www.kaobiguo.net/news/31623.html

http://www.kaobiguo.net/news/31624.html

http://www.kaobiguo.net/news/31625.html

http://www.kaobiguo.net/news/31626.html

http://www.kaobiguo.net/news/31627.html

http://www.kaobiguo.net/news/31628.html

http://www.kaobiguo.net/news/31629.html

http://www.kaobiguo.net/news/31630.html

http://www.kaobiguo.net/news/31631.html

http://www.kaobiguo.net/news/31632.html

http://www.kaobiguo.net/news/31633.html

http://www.kaobiguo.net/news/31634.html

http://www.kaobiguo.net/news/31635.html

http://www.kaobiguo.net/news/31636.html

http://www.kaobiguo.net/news/31637.html

http://www.kaobiguo.net/news/31638.html

http://www.kaobiguo.net/news/31639.html

http://www.kaobiguo.net/news/31640.html

http://www.kaobiguo.net/news/31641.html

http://www.kaobiguo.net/news/31642.html

http://www.kaobiguo.net/news/31643.html

http://www.kaobiguo.net/news/31644.html

http://www.kaobiguo.net/news/31646.html

http://www.kaobiguo.net/news/31647.html

http://www.kaobiguo.net/news/31648.html

http://www.kaobiguo.net/news/31649.html

http://www.kaobiguo.net/news/31650.html

http://www.kaobiguo.net/news/31651.html

http://www.kaobiguo.net/news/31652.html

http://www.kaobiguo.net/news/31653.html

http://www.kaobiguo.net/news/31654.html

http://www.kaobiguo.net/news/31655.html

http://www.kaobiguo.net/news/31656.html

http://www.kaobiguo.net/news/31657.html

http://www.kaobiguo.net/news/31658.html

http://www.kaobiguo.net/news/31659.html

http://www.kaobiguo.net/news/31660.html

http://www.kaobiguo.net/news/31661.html

http://www.kaobiguo.net/news/31662.html

http://www.kaobiguo.net/news/31663.html

http://www.kaobiguo.net/news/31664.html

http://www.kaobiguo.net/news/31665.html

http://www.kaobiguo.net/news/31666.html

http://www.kaobiguo.net/news/31667.html

http://www.kaobiguo.net/news/31668.html

http://www.kaobiguo.net/news/31669.html

http://www.kaobiguo.net/news/31670.html

http://www.kaobiguo.net/news/31671.html

http://www.kaobiguo.net/news/31672.html

http://www.kaobiguo.net/news/31673.html

http://www.kaobiguo.net/news/31674.html

http://www.kaobiguo.net/news/31675.html

http://www.kaobiguo.net/news/31676.html

http://www.kaobiguo.net/news/31677.html

http://www.kaobiguo.net/news/31678.html

http://www.kaobiguo.net/news/31679.html

http://www.kaobiguo.net/news/31680.html

http://www.kaobiguo.net/news/31681.html

http://www.kaobiguo.net/news/31682.html

http://www.kaobiguo.net/news/31683.html

http://www.kaobiguo.net/news/31684.html

http://www.kaobiguo.net/news/31685.html

http://www.kaobiguo.net/news/31686.html

http://www.kaobiguo.net/news/31687.html

http://www.kaobiguo.net/news/31688.html

http://www.kaobiguo.net/news/31689.html

http://www.kaobiguo.net/news/31690.html

http://www.kaobiguo.net/news/31691.html

http://www.kaobiguo.net/news/31692.html

http://www.kaobiguo.net/news/31693.html

http://www.kaobiguo.net/news/31694.html

http://www.kaobiguo.net/news/31695.html

http://www.kaobiguo.net/news/31696.html

http://www.kaobiguo.net/news/31697.html

http://www.kaobiguo.net/news/31698.html

http://www.kaobiguo.net/news/31699.html

http://www.kaobiguo.net/news/31700.html

http://www.kaobiguo.net/news/31701.html

http://www.kaobiguo.net/news/31702.html

http://www.kaobiguo.net/news/31703.html

http://www.kaobiguo.net/news/31704.html

http://www.kaobiguo.net/news/31705.html

http://www.kaobiguo.net/news/31706.html

http://www.kaobiguo.net/news/31707.html

http://www.kaobiguo.net/news/31708.html

http://www.kaobiguo.net/news/31709.html

http://www.kaobiguo.net/news/31710.html

http://www.kaobiguo.net/news/31711.html

http://www.kaobiguo.net/news/31712.html

http://www.kaobiguo.net/news/31713.html

http://www.kaobiguo.net/news/31714.html

http://www.kaobiguo.net/news/31715.html

http://www.kaobiguo.net/news/31716.html

http://www.kaobiguo.net/news/31717.html

http://www.kaobiguo.net/news/31718.html

http://www.kaobiguo.net/news/31719.html

http://www.kaobiguo.net/news/31720.html

http://www.kaobiguo.net/news/31721.html

http://www.kaobiguo.net/news/31722.html

http://www.kaobiguo.net/news/31723.html

http://www.kaobiguo.net/news/31724.html

http://www.kaobiguo.net/news/31725.html

http://www.kaobiguo.net/news/31726.html

http://www.kaobiguo.net/news/31727.html

http://www.kaobiguo.net/news/31728.html

http://www.kaobiguo.net/news/31729.html

http://www.kaobiguo.net/news/31730.html

http://www.kaobiguo.net/news/31731.html

http://www.kaobiguo.net/news/31732.html

http://www.kaobiguo.net/news/31733.html

http://www.kaobiguo.net/news/31734.html

http://www.kaobiguo.net/news/31735.html

http://www.kaobiguo.net/news/31736.html

http://www.kaobiguo.net/news/31737.html

http://www.kaobiguo.net/news/31738.html

http://www.kaobiguo.net/news/31739.html

http://www.kaobiguo.net/news/31740.html

http://www.kaobiguo.net/news/31741.html

http://www.kaobiguo.net/news/31742.html

http://www.kaobiguo.net/news/31743.html

http://www.kaobiguo.net/news/31744.html

http://www.kaobiguo.net/news/31745.html

http://www.kaobiguo.net/news/31746.html

http://www.kaobiguo.net/news/31747.html

http://www.kaobiguo.net/news/31748.html

http://www.kaobiguo.net/news/31749.html

0
分享 微信扫一扫 举报