WordPress极简博客 WordPress极简博客
  • 新鲜事
  • 战疫情
  • UI素材
    • UI素材
    • 电商/节日
    • PPT
      • 节日庆典
      • 工作汇报
      • 商业计划书
    • word
      • 简历竞聘
      • 合同/公文
  • 创客头条
    • 音乐分享
    • 初创文章
    • 极客头条
    • 生活趣事
    • 生活日记
    • 防骗指南
  • 编程教学
    • API日记
    • Linux安全栏目
      • Linux运维安全汇总
      • DDOS攻击防护
      • XSS攻击防护
      • SQL安全防护
    • Python技术栏目
      • Python基础入门
      • Python基础结构
    • WordPress技术栏目
      • WP主题
      • WordPress技术教程
      • RIPRO主题美化
    • WordPress漏洞发布
    • 技术教程汇总
    • 严选源码
  • 专题
  • 基友
  • 隐私
  • 注册
    登录
立即登录
  • 首页
  • 云优化
  • 新疫情
  • 新鲜事
    • 热文
    • 极客
    • 生活
  • 技术篇
    • WP主题
    • 技术教程
    • Python入门
    • Python基础
  • 专题篇
  • 友链君
首页 RIPRO主题美化 wordpress ripro 用户信息修改模块

wordpress ripro 用户信息修改模块

夏柔 12月 3, 2019

Ripro主题 文章右上角 用户信息修改模块

未修改的:

wordpress ripro 用户信息修改模块-WordPress极简博客

修改后图片:

 

教程开始:首先打开 Ripro主题文件,搜索 widgets.theme.php : 

wordpress ripro 用户信息修改模块-WordPress极简博客

打开文件,并搜索 widget-userinfo (大概在208行左右) 全部复制替换一下代码

// 用户信息小工具 CSF::createWidget('cao_widget_userinfo', array( 'title' => 'RIPRO-用户信息展示', 'classname' => 'widget-userinfo', 'description' => 'RIPRO主题的小工具', 'fields' => array( ), )); if (!function_exists('cao_widget_userinfo')) { function cao_widget_userinfo($args, $instance) { if (_cao('close_site_shop','0')) { return false; } if (!is_user_logged_in()) { return false;         } global $current_user; $CaoUser = new CaoUser($current_user->ID); $site_money_ua = _cao('site_money_ua'); echo $args['before_widget']; // start ob_start(); ?> <div class="author-card_content"> <div class="authorinfo-header-title"> <div class="authorinfo-codesign-single"> <?php echo get_avatar($current_user->user_email); ?> </div> <div class="author-info-vip-single"> <div class="authorinfo-header"> <?php echo $current_user->display_name;?> </div> <?php if ($CaoUser->vip_status()) { $tips='<span class="tips">正常</span>'; echo '<span class="label label-warning">'.$CaoUser->vip_name().'</span>'; }else{ $tips='<span class="tips">到期</span>'; echo '<span class="label label-default" style="padding-left:0px;padding-top:0px;">已到期</span>'; } ?> </div> <?php if (_cao('is_qiandao','1')) : ?> <div class="author-qiandao-single"> <?php if (_cao_user_is_qiandao()) { echo '<button type="button" class="btn btn--secondary disabled ripro-qiandao" style="right: -15px;border-radius:50px;background-image: linear-gradient(60deg, #777777 60%, #ffd1ff 100%);"><i class="fa fa-check"></i> 明日继续</button>'; }else{ echo '<button type="button" class="click-qiandao btn btn--secondary ripro-qiandao" style="right: -15px;border-radius:50px;background-image: linear-gradient(60deg, #777777 60%, #ffd1ff 100%);">签到<span>领<span>'._cao('qiandao_to_money','5').'</span>'.$site_money_ua.'</span></button>'; } ?> </div> <?php endif; ?> </div> <div class="author-fields"> <div class="ripro-author-fields"> <span class="ripro-author-yue" style="color:#fff"><?php echo $CaoUser->get_balance();?></span> <span style="color:#bcb7a9">余额(<?php echo $site_money_ua;?>)</span> </div> <div class="ripro-author-fields"> <span class="ripro-author-yue" style="color:#fff"><?php echo $CaoUser->get_consumed_balance();?></span> <span style="color:#bcb7a9">消费(<?php echo $site_money_ua;?>币)</span> </div> </div> </div> <?php echo ob_get_clean(); // end echo $args['after_widget']; } }

替换后保存,并打开 diy.css 文件(有缓存的记得清理浏览器缓存 / 清理CDN缓存)

添加:

/*签到 样式开始*/ .widget-userinfo{ background: url(https://img.srcdict.com/VIPZ.png); background-repeat: no-repeat; background-size: 100% 100%; box-shadow: 0 34px 10px -24px rgba(136,161,206,0.34); } .authorinfo-header-title { margin-bottom: 1.5rem; margin-top: 1.5rem; display: flex!important; } .authorinfo-codesign-avatar { width: 45.6px; height: 45.6px; display: flex; flex-shrink: 0; cursor: pointer; border-radius: 50%; overflow: hidden; } .author-info-vip{ margin-left: 1rem; flex-shrink: 0; border-radius: 500px; cursor: pointer; } .authorinfo-header { font-size: 0.9rem !important; font-weight: 400; line-height: 1.5; color: #fff; } .authorinfo-header-time, .label-default{ font-size: 0.7rem !important; color: #dedbd2; font-weight: 400; line-height: 1.5; background-color:rgba(0,0,0,0) } .authorinfo-codesign-single { width: 40px; height: 40px; display: flex; flex-shrink: 0; cursor: pointer; border-radius: 50%; overflow: hidden; } .author-info-vip-single { margin-left: 0.4rem; flex-shrink: 0; border-radius: 500px; cursor: pointer; } .author-qiandao-single { padding: 0px; padding-top: 0px; height: 40px; line-height: 40px; right: -15px; position: absolute; } .ripro-author-fields{ background-color:rgba(0,0,0,0)!important; color: #fff; } .ripro-author-yue{ font-size: 23px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; white-space: normal; } /*签到 样式结束*/

注: 此教程仅对 未修改/美化 过 用户信息模块生效,其他美化 / 修改 过 的用户请自行处理 .

#RIPRO#wordpress#wordpress美化
3
等 3 人赞过
J2dcg1.png
猜你喜欢
  • Nginx添加跨域限制规则
  • 使用测速脚本对国内Linux服务器进行测速
  • 域名爆破之自动化信息收集脚本
  • 利用免费接口实现国家开放大学刷网课脚本
  • RiProV2定制导航条
  • 判断是否在微信浏览器打开
  • 微信内自动播放音频非百度方案
  • 利用veImageX加速您的网站,想不快都难!
  • SWAPIDC减少注册信息及防刷注册量教学
  • Python实现定时发送每日早报及生活指数
06 10月, 2019
ripro主题作者头像指针旋转动画
夏柔
站长
夏山如碧 - 怀柔天下
1725
文章
25
评论
58145K
获赞
版权声明

文章采用创作共用版权 CC BY-NC-ND/2.5/CN 许可协议,与本站观点无关。

如果您认为本文侵犯了您的版权信息,请与我们联系修正或删除。
投诉邮箱wpsite@aliyun.com

栏目推荐
Python基础入门33
WordPress技术教程267
前沿技术情报所22
城市创新——新消费11
最近有哪些不可错过的热文23
程序员的养生之道0
节
春
  • 新鲜事
  • 疫情实况
  • UI素材
  • 技术教程
  • 音乐分享
  • 专题
  • 友情
  • 隐私
  • 云优化
Copyright © 2019-2025 WordPress极简博客. Designed by 夏柔. 辽公网安备21010502000474号 辽ICP备19017037号-2