RiPlus美化:静态的VIP介绍页修改为动态介绍

RiPlus美化:静态的VIP介绍页修改为动态介绍

样式:

 

RiPlus美化:静态的VIP介绍页修改为动态介绍插图

 

RiPlus美化:静态的VIP介绍页修改为动态介绍插图(1)

 

 

教程开始:

 

将下面这个代码全部复制替换掉主题目录下/template-parts/home/vipinfo.php 这个文件。

<span class="token prolog"><?php
if (is_close_site_shop()) {
  return false;
}
$vip_opt =  _get_site_vip_options();
//图标地址:http://cdn.materialdesignicons.com/3.6.95/  选择喜欢的图标,单机复制,回来粘贴即可
$coldata=[
  [
    'icon'=>'mdi-access-point', //图标
    'title'=>$wpdb->get_var($wpdb->prepare("SELECT COUNT(post_id) FROM $wpdb->postmeta WHERE meta_key=%s AND meta_value=%s", 'cao_status',1)).'+资源,无限量下载', //标题
    'desc'=>'真正的海量,无套路,诚意满满,会员资源免费下载', //描述
  ],
  [
    'icon'=>'mdi-cloud-download',
    'title'=>'5m/s速度,百度云极速下载',
    'desc'=>'本地无需备份,即需即下,无需等待',
  ],
  [
    'icon'=>'mdi-gitlab',
    'title'=>'999+原创精品,专享下载',
    'desc'=>'严格审核原创版权作品,VIP任性下载!',
  ],
  [
    'icon'=>'mdi-diamond-stone',
    'title'=>'VIP标示,彰显尊贵身份',
    'desc'=>'点亮尊贵身份标示,散发与众不同气质',
  ],
];
//会员价格介绍模块
$_caovip_data = [
  [
    'title'=>$vip_opt['month_vip']['name'].'会员',
    'r_title'=>'一个月时长',
    'price'=>$vip_opt['month_vip']['price'],
    'color'=>'success',
    'desc'=>'<li>免费资源无限下载</li>
                <li>VIP资源全部免费</li>
                <li>每天10次VIP资源下载</li>
                <li>全站无限制收藏次数</li>
                <li>月卡VIP会员专属资源</li>
                <li><s>月卡VI会员P专属资源</s></li>
                <li><s>月卡VIP会员专属资源</s></li>
                <li><s>5×8小时在线人工客服</s></li>
                <li><s>优先体验新功能</s></li>',
  ],
  [
    'title'=>$vip_opt['year_vip']['name'].'会员',
    'r_title'=>'12个月时长',
    'price'=>$vip_opt['year_vip']['price'],
    'color'=>'danger',
    'desc'=>'<li>免费资源无限下载</li>
                <li>年VIP资源全部免费</li>
                <li>每天20次VIP资源下载</li>
                <li>全站无限制收藏次数</li>
                <li>月卡VIP会员专属资源</li>
                <li>年卡VIP会员专属资源</li>
                <li><s>永久VIP会员专属资源</s></li>
                <li><s>5×8小时在线人工客服</s></li>
                <li><s>优先体验新功能</s></li>',
  ],
  [
    'title'=>$vip_opt['permanent_vip']['name'].'会员',
    'r_title'=>'终身永久有效',
    'price'=>$vip_opt['permanent_vip']['price'],
    'color'=>'warning',
    'desc'=>'<li>免费资源无限下载</li>
                <li>永久VIP资源全部免费</li>
                <li>每天66次VIP资源下载</li>
                <li>全站无限制收藏次数</li>
                <li>永久VIP会员专属资源</li>
                <li><s>年卡VI会员P专属资源</s></li>
                <li><s>永久VIP会员专属资源</s></li>
                <li><s>5×8小时在线人工客服</s></li>
                <li><s>优先体验新功能</s></li>',
  ],
];
// 帮助配置 在这里修改 图标参考同上面图标参考地址一样
$carddata = [
  [
    'icon'=>'mdi-help-network',
    'title'=>'开通会员后是否可以无限下载',
    'desc'=>'本站所有资源,针对不同等级VIP会员可直接下载,特殊资源商品会注明是否免费,指会员所享有根据选择购买的会员选项所享有的特殊服务,具体以本站公布的服务内容为准',
  ],
  [
    'icon'=>'mdi-hand',
    'title'=>'VIP会员支持续费吗,到期后权限如何重新开通?',
    'desc'=>'在遵守VIP会员协议前提下,VIP会员支持升级续费,月卡VIP可以升级年卡VIP,年卡VIP可以升级永久VIP,永久VIP是最高权限,本站所有资源,针对不同等级VIP会员可直接下载,特殊资源商品会注明是否免费,VIP会员在会员有效期内可以任意下载所有免费和VIP资源。',
  ],
  [
    'icon'=>'mdi-google-photos',
    'title'=>'购买VIP后是否可以退款?',
    'desc'=>'VIP会员属于虚拟服务,付款后不能够申请退款。请您在确认开通前认真选购,如付款前有任何疑问,联系站长咨询确认。',
  ],
];
// 帮助配置 在这里修改 图标参考同上面图标参考地址一样
// 这里为静态数组展示 为什么不用动态呐 因为很多人的站没有那么多真实数据
$coldata2 = [
  [
    'color'=>'text-warning',
    'icon'=>'mdi-account-group',
    'title'=>$wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users").'+',
    'desc'=>'会员总数(位)',
  ],
 
];
$is_pt = (is_page_template('pages/vipinfo.php')) ? 'mt-0' : 'mt-5' ;
?></span>
<span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>vipinfo-part <?php echo $is_pt;?><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token punctuation"><</span>section <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>vipinfo-page lazyload py-5 mb-0<span class="token punctuation">"</span></span> <span class="token attr-name">data-bg</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span><?php echo get_template_directory_uri();?>/assets/img/vipinfo-banner.png<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>container text-center<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    
      <span class="token tag"><span class="token punctuation"><</span>h3 <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>h3 text-white<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>加入本站VIP会员订阅计划,海量资源免费下载查看<span class="token tag"><span class="token punctuation"></</span>h3<span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"><</span>p <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>text-white<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>目前为止共有 <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>badge badge-pill badge-light<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token prolog"><?php $users = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users"); echo $users; ?></span>+<span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span> 位优秀的VIP会员加入!<span class="token tag"><span class="token punctuation"></</span>p<span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"><</span>a <span class="token attr-name">target</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>_blank<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span><?php echo esc_url(home_url(<span class="token punctuation">'</span>/user?action=vip<span class="token punctuation">'</span>));?><span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>btn btn-outline-warning<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"><</span>i <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mdi mdi-diamond-stone<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>i<span class="token punctuation">></span></span> 立即加入VIP会员<span class="token tag"><span class="token punctuation"></</span>a<span class="token punctuation">></span></span>
    
    <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
<span class="token tag"><span class="token punctuation"></</span>section<span class="token punctuation">></span></span>
<span class="token tag"><span class="token punctuation"><</span>section <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>slice pt-0 mt-0 bg-white<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
  
  <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>container<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mb-5 text-center<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"><</span>h3 <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>pt-5<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>VIP会员尊享专属特权<span class="token tag"><span class="token punctuation"></</span>h3<span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>row<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
      <span class="token prolog"><?php foreach ($coldata as $k => $v) { ?></span>
        <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>col-lg-6<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>card hover-shadow-lg hover-scale-110<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>card-body py-4<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
                <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>d-flex align-items-start<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
                  <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>icon text-primary rounded-circle<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"><</span>i <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mdi <?php echo $v[<span class="token punctuation">'</span>icon<span class="token punctuation">'</span>];?><span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>i<span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
                  <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>icon-text pl-4<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
                    <span class="token tag"><span class="token punctuation"><</span>h5 <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ma-0 <span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token prolog"><?php echo $v['title'];?></span><span class="token tag"><span class="token punctuation"></</span>h5<span class="token punctuation">></span></span>
                    <span class="token tag"><span class="token punctuation"><</span>p <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mb-0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token prolog"><?php echo $v['desc'];?></span><span class="token tag"><span class="token punctuation"></</span>p<span class="token punctuation">></span></span>
                  <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
                <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
        <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
      <span class="token prolog"><?php } ?></span>
    <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
  <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
<span class="token tag"><span class="token punctuation"></</span>section<span class="token punctuation">></span></span>
<span class="token tag"><span class="token punctuation"><</span>section <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>vipinfo-page slice pt-5 mb-5<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>tongue tongue-up tongue-section-primary<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token punctuation"><</span>i <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mdi mdi-chevron-up<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>i<span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>container position-relative<span class="token punctuation">"</span></span><span class="token style-attr language-css"><span class="token attr-name"> style</span><span class="token punctuation">="</span><span class="token attr-value"><span class="token property">z-index</span><span class="token punctuation">:</span> <span class="token number">3</span><span class="token punctuation">;</span><span class="token property">max-width</span><span class="token punctuation">:</span> <span class="token number">1080</span>px<span class="token punctuation">;</span></span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    
    
    <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>row row-grid justify-content-center<span class="token punctuation">"</span></span><span class="token style-attr language-css"><span class="token attr-name"> style</span><span class="token punctuation">="</span><span class="token attr-value"> <span class="token property">margin-bottom</span><span class="token punctuation">:</span> <span class="token number">5</span>rem<span class="token punctuation">;</span> </span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>col-lg-6 text-center<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>h6 <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>text-sm text-uppercase ls-2 text-white<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Pricing<span class="token tag"><span class="token punctuation"></</span>h6<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>h3 <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>h3 text-white<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>关于VIP会员介绍<span class="token tag"><span class="token punctuation"></</span>h3<span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
        <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
        <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>pricing card-group flex-column flex-md-row<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
        <span class="token prolog"><?php foreach ($_caovip_data as $key => $item) { 
          $cssVal = ($key==1) ? 'card card-pricing rounded text-center scale-110 shadow-lg popular' : 'card card-pricing text-center' ;
        ?></span>
            <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span><?php echo $cssVal;?><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>card-header py-5 border-0 delimiter-bottom<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
                <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>d-block h5 mb-4<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"><</span>i <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mdi mdi-diamond-stone<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>i<span class="token punctuation">></span></span> <span class="token prolog"><?php echo $item['title'];?></span><span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span>
                <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>h1 text-center mb-0 text-<?php echo $item[<span class="token punctuation">'</span>color<span class="token punctuation">'</span>];?><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>¥<span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>price<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token prolog"><?php echo $item['price'];?></span><span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
                <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>h6 text-muted<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token prolog"><?php echo $item['r_title'];?></span><span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>card-body<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
                <span class="token tag"><span class="token punctuation"><</span>ul <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>list-unstyled mb-4 descinfo<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
                  <span class="token prolog"><?php echo $item['desc'];?></span>
                <span class="token tag"><span class="token punctuation"></</span>ul<span class="token punctuation">></span></span>
                <span class="token tag"><span class="token punctuation"><</span>a <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span><?php echo esc_url(home_url(<span class="token punctuation">'</span>/user?action=vip<span class="token punctuation">'</span>));?><span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>btn btn-<?php echo $item[<span class="token punctuation">'</span>color<span class="token punctuation">'</span>];?> btn-shadow mb-3<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>立即升级<span class="token tag"><span class="token punctuation"></</span>a<span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
        <span class="token prolog"><?php } ?></span>
        <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>shape-container<span class="token punctuation">"</span></span> <span class="token attr-name">data-shape-position</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>bottom<span class="token punctuation">"</span></span><span class="token style-attr language-css"><span class="token attr-name"> style</span><span class="token punctuation">="</span><span class="token attr-value"><span class="token property">height</span><span class="token punctuation">:</span>auto<span class="token punctuation">;</span></span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token punctuation"><</span>svg <span class="token attr-name">preserveAspectRatio</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>none<span class="token punctuation">"</span></span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.w3.org/2000/svg<span class="token punctuation">"</span></span> <span class="token attr-name">viewBox</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>0 0 1437.24 372.58<span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ie-shape-clouds<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"><</span>path <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>fill-section-primary<span class="token punctuation">"</span></span> <span class="token attr-name">d</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>M1.35,97.76.5-189l16,8.88s28.43-111.93,145.68-53.3c0,0,42.13-28.11,63.71,9.81,0,0,30.73-57.54,90.88-11.11,0,0,136-132.07,196.8,86.3,0,0,86.3-171.3,234.72,5.23,0,0,39.23-102.65,143.19-22.23,0,0,5.88-113.11,149.07-61.46,0,0,68.65-100,189-11.11,0,0,126.84-28.11,151.69,87,0,0,34.65-34.65,56.23-18.31l.33,267.1Z<span class="token punctuation">"</span></span> <span class="token attr-name">transform</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>translate(-0.5 400)<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>path<span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"><</span>path <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>fill-section-primary opacity-5<span class="token punctuation">"</span></span> <span class="token attr-name">d</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>M.56-113.82,1.35,97.76H1437.74l-.55-207.55s-62.35-102.82-192-23.19c0,0-50.05-64.84-110.35-5.69,0,0-22.75-37.54-52.33-13.65,0,0-18.2-75.08-87.59-30.71,0,0-29.58-18.2-36.4,8,0,0-101.25-122.86-167.23,18.2,0,0-78.49-60.29-137.65,12.51,0,0-35.27-26.16-52.33-1.14,0,0-2.28-27.3-36.4-11.38,0,0-31.85-52.33-91-21.61,0,0-48.92-64.84-111.48-6.83,0,0-62.88-21.69-72.81,29.58,0,0-44.91-23.4-43.23,19.34,0,0-39.82-51.19-81.91,4.55,0,0-54.6-44.37-94.42,9.1C70-122.74,17.56-154.95.56-113.82Z<span class="token punctuation">"</span></span> <span class="token attr-name">transform</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>translate(-0.5 274.83)<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>path<span class="token punctuation">></span></span>
        <span class="token tag"><span class="token punctuation"></</span>svg<span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
  
<span class="token tag"><span class="token punctuation"></</span>section<span class="token punctuation">></span></span>
<span class="token tag"><span class="token punctuation"><</span>section <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>slice bg-white mt-1 pb-5<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>container<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mb-5 text-center<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"><</span>h3 <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>h3 pt-5<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>VIP会员常见问题说明<span class="token tag"><span class="token punctuation"></</span>h3<span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>fluid-paragraph mt-3<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token punctuation"><</span>p <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>text-muted<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>开通会员常见问题说明,如又不懂可以联系本站客服咨询<span class="token tag"><span class="token punctuation"></</span>p<span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>row justify-content-center<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>col-lg-8<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>accordion_1<span class="token punctuation">"</span></span> <span class="token attr-name">data-accordion</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>1<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
        <span class="token prolog"><?php foreach ($carddata as $k => $v) { ?></span>
        <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>card mb-3<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>card-header py-4 collapsed<span class="token punctuation">"</span></span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>heading_1_<?php echo $k;?><span class="token punctuation">"</span></span> <span class="token attr-name">data-toggle</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>collapse<span class="token punctuation">"</span></span> <span class="token attr-name">role</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>button<span class="token punctuation">"</span></span> <span class="token attr-name">data-target</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>#collapse_1_<?php echo $k;?><span class="token punctuation">"</span></span> <span class="token attr-name">aria-expanded</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>false<span class="token punctuation">"</span></span> <span class="token attr-name">aria-controls</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>collapse_1_<?php echo $k;?><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"><</span>h5 <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>font-weight-normal mb-0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"><</span>i <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mdi <?php echo $v[<span class="token punctuation">'</span>icon<span class="token punctuation">'</span>];?><span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>i<span class="token punctuation">></span></span> <span class="token prolog"><?php echo $v['title'];?></span><span class="token tag"><span class="token punctuation"></</span>h5<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>collapse_1_<?php echo $k;?><span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>collapse<span class="token punctuation">"</span></span> <span class="token attr-name">aria-labelledby</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>heading_1_<?php echo $k;?><span class="token punctuation">"</span></span> <span class="token attr-name">data-parent</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>#accordion_1<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>card-body<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
                <span class="token tag"><span class="token punctuation"><</span>p<span class="token punctuation">></span></span><span class="token prolog"><?php echo $v['desc'];?></span><span class="token tag"><span class="token punctuation"></</span>p<span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
        <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>  
        <span class="token prolog"><?php } ?></span>
        
          
        <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
  <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
<span class="token tag"><span class="token punctuation"></</span>section<span class="token punctuation">></span></span>
<span class="token tag"><span class="token punctuation"><</span>section <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>slice py-5<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>container-lg<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>row align-items-md-center<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
      <span class="token prolog"><?php foreach ($coldata2 as $k => $v) { ?></span>
        <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>col-lg-3 col-6 mb-5 mb-lg-0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>text-center mb-5 mb-lg-0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>icon icon-lg <?php echo $v[<span class="token punctuation">'</span>color<span class="token punctuation">'</span>];?><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"><</span>i <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mdi <?php echo $v[<span class="token punctuation">'</span>icon<span class="token punctuation">'</span>];?><span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>i<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>d-block mt-0 h3 <?php echo $v[<span class="token punctuation">'</span>color<span class="token punctuation">'</span>];?><span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token prolog"><?php echo $v['title'];?></span><span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>d-block mt-2 h6<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token prolog"><?php echo $v['desc'];?></span><span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
       <span class="token prolog"><?php } ?></span>
       
       <span class="token comment"><!--总更新--></span>
      <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>col-lg-3 col-6 mb-5 mb-lg-0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>text-center mb-5 mb-lg-0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>icon icon-lg text-info<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"><</span>i <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mdi mdi-timelapse<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>i<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>d-block mt-0 h3 text-info<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token prolog"><?php $count_posts = wp_count_posts(); echo $published_posts = $count_posts->publish;?></span>+<span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>d-block mt-2 h6<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>资源总数(个)<span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
       
      <span class="token comment"><!--每日更新--></span>
      <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>col-lg-3 col-6 mb-5 mb-lg-0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>text-center mb-5 mb-lg-0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>icon icon-lg text-info<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"><</span>i <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mdi mdi-timelapse<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>i<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>d-block mt-0 h3 text-info<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token prolog"><?php echo WeeklyUpdate();?></span>+<span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>d-block mt-2 h6<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>今日发布(个)<span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
      
      <span class="token comment"><!--稳定运行天数新--></span>
      <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>col-lg-3 col-6 mb-5 mb-lg-0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>text-center mb-5 mb-lg-0<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>icon icon-lg text-success<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
              <span class="token tag"><span class="token punctuation"><</span>i <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mdi mdi-monitor-multiple<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token punctuation"></</span>i<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>d-block mt-0 h3 text-success<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token prolog"><?php echo floor((time()-strtotime("2020-03-25"))/86400); ?></span>+<span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span>
            <span class="token tag"><span class="token punctuation"><</span>span <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>d-block mt-2 h6<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>稳定运行(天)<span class="token tag"><span class="token punctuation"></</span>span<span class="token punctuation">></span></span>
          <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
      <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
    <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
  <span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>
<span class="token tag"><span class="token punctuation"></</span>section<span class="token punctuation">></span></span>
<span class="token tag"><span class="token punctuation"></</span>div<span class="token punctuation">></span></span>

在主题目录里面的functions.php最后添加下面代码

<span class="token comment">// 每日更新的文章数量</span>
<span class="token keyword keyword-function">function</span> <span class="token function">WeeklyUpdate</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token variable">$today</span> <span class="token operator">=</span> <span class="token function">getdate</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token variable">$query</span> <span class="token operator">=</span> <span class="token keyword keyword-new">new</span> <span class="token class-name">WP_Query</span><span class="token punctuation">(</span> <span class="token single-quoted-string string">'year='</span> <span class="token punctuation">.</span> <span class="token variable">$today</span><span class="token punctuation">[</span><span class="token double-quoted-string string">"year"</span><span class="token punctuation">]</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">'&monthnum='</span> <span class="token punctuation">.</span> <span class="token variable">$today</span><span class="token punctuation">[</span><span class="token double-quoted-string string">"mon"</span><span class="token punctuation">]</span> <span class="token punctuation">.</span> <span class="token single-quoted-string string">'&day='</span> <span class="token punctuation">.</span> <span class="token variable">$today</span><span class="token punctuation">[</span><span class="token double-quoted-string string">"mday"</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token variable">$postsNumber</span> <span class="token operator">=</span> <span class="token variable">$query</span><span class="token operator">-</span><span class="token operator">></span><span class="token property">found_posts</span><span class="token punctuation">;</span>
<span class="token keyword keyword-echo">echo</span> <span class="token variable">$postsNumber</span><span class="token punctuation">;</span>
<span class="token punctuation">}<!--hide end--></span>

 

分享到 :
相关推荐