begin主题美化404错误页代码

教程214,7454字数 1179阅读3分55秒阅读模式

begin主题美化404错误页面,个人感觉begin主题的404错误页面好久没变了,这里改改代码,不自动跳转,看美图🤔,先找到主题目录里的404文件里面的代码删完再复制下面代码进去。begin主题美化404错误页代码

代码:

  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) { exit; }
  3. get_header(); ?>
  4. <?php if (zm_get_option('404_go') == '404_h') { ?>
  5. <?php
  6. header("HTTP/1.1 301 Moved Permanently");
  7. header("Location: ".stripslashes( zm_get_option('404_url') ));
  8. exit();
  9. ?>
  10. <?php } ?>
  11. <script src="//pv.sohu.com/cityjson?ie=utf-8"></script>
  12. <div style="text-align:center;">
  13.   <!--
  14.   夏沫博客
  15.   https://www.seovx.com/
  16.   -->
  17.   <h1>您的IP已被本站记录404</h1>
  18.   <script>document.write(returnCitySN["cname"])</script>
  19.   的朋友您好,本站已向有关部门进行备案,您的IP已被本站记录,请勿对本站进行不利的操作,如发现会提交给司法部门进行处理!
  20.   </br>
  21.   IP:<script type="text/javascript">document.write(returnCitySN["cip"])</script>
  22. <div>
  23.  <a href="/" style="display:inline-block;border:1px solid #ccc;line-height:36px;padding:0 25px;border-radius:8px;">点击返回</a>
  24.  <a href="javascript:location.reload();" style="display:inline-block;border:1px solid #ccc;line-height:36px;padding:0 25px;border-radius:8px;">点击刷新</a>
  25. </div>
  26.   <br>
  27.   <div class="cdn">
  28.     <a href="https://cdn.seovx.com">
  29.       <img src="https://cdn.seovx.com/?mom=302" width="100%" alt="小姐姐" style="border-radius:10px;"></a>
  30.   </div>
  31.  </div>
  32. </div>
  33. <?php get_footer(); ?>

我的微信
微信扫一扫
weinxin
我的微信
我的微信公众号
微信扫一扫
weinxin
我的公众号
 
  • 本文由 夏沫 发表于 2021年12月13日09:15:05
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
评论  2  访客  2
    • 灵 、Хi 0

      签到成功!签到时间:上午1:38:59,每日打卡,生活更精彩哦~

      • 明月登楼 0

        亲,你的这个不是 Begin 主题了吧!

      发表评论

      匿名网友
      :?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
      确定

      拖动滑块以完成验证