Wordpress日主题美化教程

导航颜色修改

第一步:打开日主题的 inc/options.theme.php文件,找到第153行后面添加:

  1. array(
  2. 'id' => 'is_header_white',
  3. 'type' => 'switcher',
  4. 'title' => '顶部导航白色背景',
  5. 'label' => '',
  6. 'default' => false,
  7. ),

添加后,刷新后台设置框架的“顶部设置”发现多了一项(默认是关闭状态):

Wordpress日主题美化教程

第二步:打开日主题目录下的 header.php,把第18行 改成:

  1. class="header ">

第三步:打开日主题 style.css文件

找到下面对应的样式并修改如下:

  1. .header.white .site-navbar>ul>li>a{color:#555;}

增加一行:

  1. .header.white .wel .wel-item-btn>a{color:#fff}

搜索栏美化

/rizhuti/home-module/module-banner.php(整页替换)

  1. if (!$paged || $paged===1) { ?>
  2. <div class="focusbox" id="focsbox-true" style="background-image: url();background-attachment: fixed;">
  3. <div class="focusbox-image-overlay">div>
  4. <div class="container">
  5. <h3 class="focusbox-title"> echo _hui('banner_title'); ?>h3>
  6. <form class="form-inline" id="fh5co-header-subscribe" method="get" action="">
  7. <div class="form-group">
  8. <input type="text" class="form-control" id="email" name="s" placeholder="输入要查找关键字">
  9. <button type="submit" class="btn btn-default" style=" top: 7px; right: 12px; border-radius: 64px !important; background: #ffffff;padding: 8px 12px;color: #3b3b3b;background: #fafcff;"><i class="iconfont">i>button>
  10. <div class="tag_cloud" style="text-align: left;margin-top: 10px;"><a href="https://www.apeyizhan.com/archives/tag/建站/" class="tag-cloud-link tag-link-35 tag-link-position-1" style="font-size: 14px;">建站a>
  11. <a href="https://www.apeyizhan.com/archives/tag/渗透/" class="tag-cloud-link tag-link-9 tag-link-position-2" style="font-size: 14px;">渗透a>
  12. <a href="https://www.apeyizhan.com/archives/tag/破解/" class="tag-cloud-link tag-link-13 tag-link-position-3" style="font-size: 14px;">破解a>
  13. <a href="https://www.apeyizhan.com/archives/tag/PHP/" class="tag-cloud-link tag-link-3 tag-link-position-4" style="font-size: 14px;">PHPa>
  14. <a href="https://www.apeyizhan.com/archives/tag/工具/" class="tag-cloud-link tag-link-5 tag-link-position-5" style="font-size: 14px;">工具a>
  15. <a href="https://www.apeyizhan.com/archives/tag/WordPress主题/" class="tag-cloud-link tag-link-15 tag-link-position-6" style="font-size: 14px;">WordPress主题a>
  16. <a href="https://www.apeyizhan.com/archives/tag/源码/" class="tag-cloud-link tag-link-8 tag-link-position-7" style="font-size: 14px;">源码a>
  17. <a href="https://www.apeyizhan.com/archives/tag/小程序/" class="tag-cloud-link tag-link-8 tag-link-position-7" style="font-size: 14px;">小程序a>div>
  18. div>
  19. form>
  20. div>
  21. <style>.tag_cloud a {margin-left: 10px;}style>
  22. div>
  23. } ?>

2、在后台自定义css中加入如下样式:

  1. /** 搜索banner */
  2. .tag_cloud a {
  3. color: #8a9197!important;
  4. }
  5. .tag_cloud a:hover {
  6. color: #f0f4f8!important;
  7. }
  8. .focusbox .form-group{
  9. height: 60px;
  10. background: #fafcff;
  11. border-radius: 4px;
  12. border: 2px solid #ebeef7;
  13. }
  14. #fh5co-header-subscribe button {
  15. top: -2px;
  16. right: -2px;
  17. padding: 18px 30px;
  18. }
  19. .form-group input{
  20. height: 100%!important;
  21. background: none!important;
  22. font-size: 12px!important;
  23. }

3、最终效果

Wordpress日主题美化教程

类推荐美化

最终目标:

Wordpress日主题美化教程

1、/rizhuti/home-module/module-catbox.php(整页替换)

  1. if (!$paged || $paged===1) {
  2. $module_catbox = _hui( 'catbox' );
  3. ?>
  4. <section class="container-white home1">
  5. <div class="container">
  6. <div class="row block-wrapper">
  7. if (!$module_catbox) { ?>
  8. <h2 style=" text-align: center; margin: 0 auto; padding: 60px; ">请前往后台新分类推荐模块!h2>
  9. }else{ ?>
  10. foreach ($module_catbox as $key => $value) { ?>
  11. if ($value['cat_id']) { ?>
  12. <div class="cms-category">
  13. <div class="category-tile"><div class="category-tile__wrap">
  14. <div class="background-img" style="background-image:url()">div>
  15. <div class="category-tile__inner">
  16. <div class="category-tile__text inverse-text">
  17. $home_special_catid= $value['cat_id'];
  18. $home_special__name = get_category($home_special_catid)->name;
  19. $home_special__link = get_category_link( $home_special_catid );
  20. $home_special__num = get_category($home_special_catid)->count;
  21. echo ''" title="查看全部文章" style="background: #1290de;">'.$home_special__name.'';
  22. echo '
  23. '.$home_special__num.''.'个'.'
  24. ';
  25. ?>
  26. div>
  27. div>
  28. div>
  29. div>
  30. <div class="work-box">
  31. $args = array(
  32. 'cat' =>$home_special_catid, //自定义文章类型名称
  33. 'showposts' => 4, //输出的文章数量,这个可以是缺省值,不用设置
  34. );
  35. $my_query = new WP_Query($args);
  36. if ($my_query->have_posts()) {
  37. while ($my_query->have_posts()) : $my_query->the_post(); ?>
  38. <div class="work">
  39. <a class="FreeUID" href=" " title=" " ><img src="" alt="">a>
  40. div>
  41. endwhile;
  42. wp_reset_query(); //重置 query 查询
  43. } ?>
  44. div>
  45. div>
  46. } ?>
  47. } ?>
  48. } ?>
  49. div>
  50. div>
  51. section>
  52. } ?>

2、在后台自定义css中加入样式

  1. .cms-category .category-tile {
  2. box-shadow: 0 -4px 10px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .08)!important;
  3. border-radius: 8px!important;
  4. background: #fff!important;
  5. }
  6. .cms-category .category-tile__wrap {
  7. position: relative!important;
  8. margin: 0!important;
  9. border-radius: 4px!important;
  10. height: 240px!important;
  11. }
  12. .cms-category .category-tile__inner {
  13. position: relative!important;
  14. display: -webkit-box!important;
  15. display: -moz-box!important;
  16. display: box!important;
  17. display: -webkit-flex!important;
  18. display: -moz-flex!important;
  19. display: -ms-flexbox!important;
  20. display: flex!important;
  21. min-height: 240px!important;
  22. -webkit-box-align: center!important;
  23. -moz-box-align: center!important;
  24. box-align: center!important;
  25. -webkit-align-items: center!important;
  26. -moz-align-items: center!important;
  27. -ms-align-items: center!important;
  28. -o-align-items: center!important;
  29. align-items: center!important;
  30. -ms-flex-align: center!important;
  31. }
  32. .cms-category .category-tile--sm .category-tile__inner {
  33. min-height: 120px!important;
  34. }
  35. .cms-category .category-tile .link-overlay {
  36. z-index: 1!important;
  37. }
  38. .cms-category .category-tile__text {
  39. position: absolute!important;
  40. padding: 20px 20px 15px!important;
  41. width: 100%!important;
  42. text-align: center!important;
  43. top: -10px!important;
  44. }
  45. .cms-category .category-tile__name {
  46. display: inline-block!important;
  47. max-width: 100%!important;
  48. border-radius: 2px!important;
  49. color: #5f6367!important;
  50. background: rgba(0,0,0,0)!important;
  51. text-transform: uppercase!important;
  52. font-size: .8571rem!important;
  53. -webkit-transition: all .15s ease-out 0s!important;
  54. -moz-transition: all .15s ease-out 0s!important;
  55. transition: all .25s ease-out 0s!important;
  56. }
  57. a.category-tile__name.cat-theme-bg:hover {
  58. color: #1789fa!important;
  59. }
  60. .cms-category .category-tile__description {
  61. color: #ffc01f!important;
  62. font-family: DINBold, Arial, Microsoft Yahei, 5FAE8F6F96C59ED1, Hiragino Sans GB, 5B8B4F53!important;
  63. font-size: 28px!important;
  64. margin-top: -7px!important;
  65. font-weight: 700!important;
  66. }
  67. .cms-category .category-tile:hover .background-img:after {
  68. opacity: .8!important;
  69. }
  70. .background-img {
  71. position: absolute!important;
  72. top: 0!important;
  73. right: 0!important;
  74. bottom: 0!important;
  75. left: 0!important;
  76. overflow: hidden!important;
  77. }
  78. .background-img,
  79. .has-cover-bg-img {
  80. border-radius: 4px!important;
  81. background-position: 50% 50%!important;
  82. background-size: cover!important;
  83. background-repeat: no-repeat!important;
  84. background-attachment: scroll!important;
  85. top: 70px!important;
  86. bottom: 60px!important;
  87. }
  88. .cms-category .background-img:after {
  89. position: absolute!important;
  90. top: 0!important;
  91. right: 0!important;
  92. bottom: 0!important;
  93. left: 0!important;
  94. width: 100%!important;
  95. background-color: #001529!important;
  96. content: ''!important;
  97. opacity: .6!important;
  98. -webkit-transition-timing-function: ease!important;
  99. -moz-transition-timing-function: ease!important;
  100. transition-timing-function: ease!important;
  101. -webkit-transition-duration: .3s!important;
  102. -moz-transition-duration: .3s!important;
  103. transition-duration: .3s!important;
  104. -webkit-transition-property: all!important;
  105. -moz-transition-property: all!important;
  106. transition-property: all!important;
  107. }
  108. .cms-category {
  109. margin-right: 20px!important;
  110. width: 25%!important;
  111. position: relative!important;
  112. }
  113. .cms-category:nth-child(4n) {
  114. margin-right: 0!important;
  115. }
  116. span.work-num {
  117. font-size: 12px!important;
  118. margin-left: 8px!important;
  119. color: #5f6367!important;
  120. }
  121. .work-box {
  122. display: flex!important;
  123. position: absolute!important;
  124. bottom: 0!important;
  125. }
  126. .work {
  127. flex: 1 1 25%!important;
  128. margin: 4px!important;
  129. overflow: hidden!important;
  130. -webkit-transition: all .3s ease!important;
  131. -moz-transition: all .3s ease!important;
  132. -o-transition: all .3s ease!important;
  133. transition: all .3s ease!important;
  134. }
  135. .work-box .work img {
  136. height: 50px!important;
  137. width: 100%!important;
  138. object-fit: cover!important;
  139. border-radius: 4px!important;
  140. border: 1px solid #f5f3f3!important;
  141. }
  142. .work:hover {
  143. transform: translateY(-6px)!important;
  144. -webkit-transform: translateY(-6px)!important;
  145. -moz-transform: translateY(-6px)!important;
  146. box-shadow: 0 6px 16px -10px rgba(0, 36, 100, .3)!important;
  147. -webkit-box-shadow: 0 6px 16px -10px rgba(0, 36, 100, .3)!important;
  148. -moz-box-shadow: 0 6px 16px -10px rgba(0, 36, 100, .3)!important;
  149. -webkit-transition: all .3s ease!important;
  150. -moz-transition: all .3s ease!important;
  151. -o-transition: all .3s ease!important;
  152. transition: all .3s ease!important;
  153. }
  154. .cms-category {
  155. -webkit-transition: all .3s ease!important;
  156. -moz-transition: all .3s ease!important;
  157. -o-transition: all .3s ease!important;
  158. transition: all .3s ease!important;
  159. }
  160. .cms-category:hover {
  161. transform: translateY(-6px)!important;
  162. -webkit-transform: translateY(-6px)!important;
  163. -moz-transform: translateY(-6px)!important;
  164. box-shadow: 0 26px 40px -24px rgba(0, 36, 100, .3)!important;
  165. -webkit-box-shadow: 0 26px 40px -24px rgba(0, 36, 100, .3)!important;
  166. -moz-box-shadow: 0 26px 40px -24px rgba(0, 36, 100, .3)!important;
  167. -webkit-transition: all .3s ease!important;
  168. -moz-transition: all .3s ease!important;
  169. -o-transition: all .3s ease!important;
  170. transition: all .3s ease!important;
  171. }

分类CMS标题美化

1、首先还是加入样式:

  1. "stylesheet" href="//at.alicdn.com/t/font_1169899_l2kpvs37ys.css">
  2. /**头标签*/
  3. .section-info {
  4. padding: 10px 15px 60px 15px!important;
  5. }
  6. .section-info h2 {
  7. font-weight: 400!important;
  8. font-size: 1.5rem!important;
  9. background: #fff;
  10. }
  11. .section-info h2 {
  12. float: left!important;
  13. text-align: left!important;
  14. padding: 10px;
  15. border-radius: 4px;
  16. }
  17. .section-info .postmode-description {
  18. letter-spacing: 2px!important;
  19. color: #9E9E9E!important;
  20. position: relative!important;
  21. top: 17px!important;
  22. left: 18px!important;
  23. float: left!important;
  24. }
  25. /**追加的标签*/
  26. .hh_home_zuixinlist_title {
  27. float: right;
  28. padding-top: 4px;
  29. }
  30. .hh_home_zuixinlist_title_item {
  31. float: left;
  32. display: block;
  33. margin-left: 10px;
  34. padding: 10px;
  35. border-radius: 4px;
  36. background: #fff;
  37. }
  38. .kan {
  39. font-family: "kan" !important;
  40. font-size: 16px;
  41. font-style: normal;
  42. -webkit-font-smoothing: antialiased;
  43. -moz-osx-font-smoothing: grayscale;
  44. }
  45. .kanmingcheng:before {
  46. position: relative;
  47. top: 1.5px;
  48. }

2、/rizhuti/home-module/module-postlist.php(还是全部替换吧)

  1. <section class="container">
  2. if ((!$paged || $paged===1)) { ?>
  3. <div class="section-info">
  4. <h2 class="postmodettitle"><span><i class="icon-new">i> echo _hui('mo_postlist_title') ?>h2>
  5. <div class="postmode-description"> echo _hui('mo_postlist_desc') ?>div>
  6. <div class="hh_home_zuixinlist_title"><a href="/hot" target="_blank" class="hh_home_zuixinlist_title_item hh_hide"><i class="kan kanicon">i>热门精选a>
  7. <a href="/tags" target="_blank" class="hh_home_zuixinlist_title_item hh_hide"><i class="kan kanmingcheng">i>素材标签a>
  8. <a href="/likes" target="_blank" class="hh_home_zuixinlist_title_item hh_hide"><i class="kan kantubiao">i>点赞最多a>
  9. div>
  10. div>
  11. } ?>
  12. $paged = (get_query_var('paged')) ? get_query_var('paged') : 0;
  13. $args = array(
  14. 'ignore_sticky_posts' => 0, //1改为0 置顶生效,默认不生效是怕和下面的CMS模块文章太多重复,不需要刻意不理 不是BUG'paged' => $paged
  15. );
  16. $mo_postlist_no_cat = _hui('mo_postlist_no_cat');
  17. if($mo_postlist_no_cat){
  18. // var_dump(implode($mo_postlist_no_cat, ',-'));
  19. $args['cat'] = '-'.implode($mo_postlist_no_cat, ',-');
  20. }
  21. query_posts($args);
  22. get_template_part( 'excerpt', 'home' );
  23. ?>
  24. section>
  25.  

最终效果:

Wordpress日主题美化教程

分类CMS列表美化

1、加入小标签:效果如下

Wordpress日主题美化教程

/rizhuti/excerpt-item.php

  1. echo ''.get_the_tag_list('<p class="desc"><span>','span><span>','span>p>').'';

在后台自定义css中加入样式:

  1. /** 标签字体 */
  2. .excerpt>p.desc {display: flex;flex-wrap: wrap;align-content: flex-start;height: 36px;padding: 0 10px 0 10px;overflow: hidden;text-overflow: ellipsis;}
  3. .excerpt>p.desc>span:before {content: '';position: absolute;width: 6px;height: 6px;border: 2px solid #b4c8ff;border-radius: 50%;left: 0px;top: 34%;}
  4. .excerpt>p.desc>span {padding-left: 8px;margin-right: 10px;font-size: 12px;position: relative;line-height: 18px;}
  5. .excerpt>p.desc>span>a {color: #bebebe;transition: .25s;}
  6. @media (max-width: 544px)
  7. .excerpt>p.desc {
  8. padding: 0 !important;
  9. }
  10. .excerpt>p.desc>span>a:hover {color: #118cfe !important;}

分页按钮美化

在后台自定义css中加入样式:

  1. /**分页*/
  2. .pagination ul li.next-page a {
  3. background: linear-gradient(-125deg,#0295f9 0%, #2f49fd 100%)!important;
  4. color: #fff!important;
  5. }
  6. .pagination ul li a, .pagination ul li span {
  7. display: inline-block!important;
  8. padding: .35rem 1.5rem!important;
  9. border-radius: 16px!important;
  10. }
  11. .pagination ul li.active span {
  12. background-color: #353535!important;
  13. color: #fff!important;
  14. }

关于我们美化

/rizhuti/home-module/module-about.php(整页替换)

Wordpress日主题美化教程

  1. <style>span.counter {
  2. font-size: 35px;
  3. font-weight: 700;
  4. color: #fff;
  5. background: #1890ff;
  6. padding: 5px 20px;
  7. border-radius: 4px;
  8. }
  9. .home2 h3 {
  10. margin-bottom: 0;
  11. padding: 1.8rem;
  12. color: #fff;
  13. text-align: center;
  14. }
  15. .home2 p {
  16. margin-bottom: 1.8rem;
  17. text-align: center;
  18. font-size: 30px;
  19. }
  20. style>
  21. if ((!$paged || $paged===1)) { ?><section class="container-white home2" style="background-image: url(https://ws3.sinaimg.cn/large/005BYqpgly1g1ykeok8x2j31hc0u04a3.jpg)"><div class="container"><h3> echo _hui('about_title') ?>h3><p>目前为止我们有 <span class="counter"> $users = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users"); echo $users; ?>span> 位会员,还有 <span class="counter"> echo $publish_posts = wp_count_posts()->publish;?>span> 个精品资源!p><a href="" class="btn btn-wiht"> echo _hui('about_btn') ?>a>div>
  22. section>
  23. } ?>

修改前:

Wordpress日主题美化教程

修改后:

Wordpress日主题美化教程

底部加入友情链接

/rizhuti/footer.php/加入如下代码:

  1. <div class="col l12 m12 s12"><ul class="flinks-text">
  2. <span class="flinks" style="color:#555; font-weight:500">友情链接:span>
  3. wp_list_bookmarks('&categorize=0'); ?>ul>div>

增加样式:

  1. .border-top: 1px solid rgba(172, 172, 172, 0.1);
  2. .flinks-text{margin-top: 10px;text-align: left;}
  3. .flinks-text>li{float: left;margin-left: 10px;}
  4. .flinks{float: left;font-weight: 400}
  5. .excerpt-freeuid{margin-bottom: 2%;padding: 0;overflow: hidden;}
  6. .excerpt-freeuid h2 {padding: 0 10px 0 10px;text-shadow: -1px 1px 0 rgba(0,0,0,.1);font-weight: 300;}
  7. .excerpt-freeuid>p.desc {padding: 0 10px 0 10px;}
  8. .excerpt-freeuid>footer{padding: 0 10px 10px 10px;}
  9. .linkcat>:first-child{display: none;}
  10. .blogroll>*{float:left;margin-right: 14px;}
  11. .footer-links {
  12. padding: 20px 0;
  13. border-top: 1px solid rgba(172, 172, 172, 0.1);
  14. }

个人中心美化

先来看效果:

Wordpress日主题美化教程

这个样式比较多比较麻烦所以替换吧/rizhuti/pages/user.php

  1. /**
  2. * template name: 用户中心(已购买记录)
  3. */
  4. date_default_timezone_set('Asia/Shanghai');
  5. if(!is_user_logged_in()){
  6. header("Location:".home_url('login'));
  7. exit();
  8. }
  9. get_header();
  10. global $current_user;
  11. $user_downData = this_vip_downum();
  12. ?>
  13. <style>
  14. .test{
  15. border-radius: 15px;
  16. background: #F8F8F8;
  17. height:190px
  18. }
  19. .hh_p1 span {
  20. position: relative;
  21. top: -4px;
  22. margin: -10px 0 0 10px;
  23. padding: 0 10px;
  24. padding: 1px 10px;
  25. height: 24px;
  26. border-radius: 100px;
  27. border-style:solid;
  28. border-width:1px;
  29. border-color:#ff8a00;
  30. color: #ff8a00;
  31. font-weight: 700;
  32. font-size: 14px;
  33. cursor: default;
  34. }
  35. .hh_usertop {
  36. margin-left: 48px;
  37. padding-top: 40px;
  38. padding-left: 15px;
  39. height: 120px;
  40. max-width: 1380px;
  41. }
  42. .hh_usertop .user_av {
  43. padding: 10px;
  44. }
  45. .hh_usertop .user_av img {
  46. float: left;
  47. width: 100px;
  48. height: 100px;
  49. border-radius: 5px;
  50. }
  51. .hh_usertop_right {
  52. float: left;
  53. margin-left: 20px;
  54. }
  55. .hh_p1 {
  56. position: relative;
  57. top: -6px;
  58. color: #595959;
  59. font-weight: 300;
  60. font-size: 24px;
  61. line-height: 1;
  62. }
  63. .hh_p2 {
  64. display: block;
  65. margin: 0;
  66. margin-top: -5px;
  67. padding: 0;
  68. color: gray;
  69. font-weight: 300;
  70. font-size: 18px;
  71. }
  72. .hh_p3 {
  73. margin-top: 10px;
  74. }
  75. .hh_ziliao {
  76. position: relative;
  77. top: 86px;
  78. text-align: right;
  79. z-index: 1;
  80. }
  81. .hh_ziliao .hh_user_vips {
  82. position: relative;
  83. top: 17px;
  84. float: right;
  85. padding: 17px 30px;
  86. border-radius: 4px;
  87. background: #1890ff;
  88. color: #fff;
  89. font-weight: 700;
  90. font-size: 12px;
  91. }
  92. .kan {
  93. font-family: "kan" !important;
  94. font-size: 16px;
  95. font-style: normal;
  96. -webkit-font-smoothing: antialiased;
  97. -moz-osx-font-smoothing: grayscale;
  98. }
  99. .hh_ziliao .upload {
  100. float: right;
  101. display: block;
  102. width: 170px;
  103. text-align: center;
  104. box-shadow: none;
  105. border: none;
  106. background-color: transparent;
  107. }
  108. .btn-default {
  109. color: #999;
  110. }
  111. .btn {
  112. display: inline-block;
  113. padding: .75rem 1.5rem;
  114. border-radius: 4px;
  115. font-weight: 300;
  116. font-size: .75rem;
  117. line-height: 2;
  118. }
  119. .hh_ziliao #udptips {
  120. position: relative;
  121. top: 5px;
  122. display: block;
  123. padding: 13px 20px;
  124. border-radius: 4px;
  125. background: linear-gradient(-180deg, #3fc67c 2%, #2aa461 98%);
  126. color: #fff;
  127. font-weight: 600;
  128. }
  129. .hh_ziliao input[type=file] {
  130. position: relative;
  131. top: -40px;
  132. left: 0px;
  133. z-index: 99;
  134. width: 80px;
  135. opacity: 0;
  136. cursor: pointer;
  137. }
  138. input[type=file] {
  139. display: block;
  140. }
  141. div.user_row{
  142. background-color: #fff;
  143. }
  144. .user_row {
  145. position: relative!important;
  146. top: 40px!important;
  147. padding: 18px 30px 40px 30px;
  148. height: 60px!important;
  149. margin-top: -42px;
  150. }
  151. dl, ol, ul {
  152. margin-top: 0!important;
  153. margin-bottom: 0!important;
  154. padding-left: 0!important;
  155. }
  156. .user_row li a {
  157. display: block!important;
  158. padding: 5px 0!important;
  159. color: #7b797b!important;
  160. }
  161. .user_row li {
  162. float: left!important;
  163. margin-right: 80px!important;
  164. }
  165. .user_row ul li a.active {
  166. border-bottom: 2px solid #1990fc;
  167. color: #fff;
  168. }
  169. .user_content {
  170. padding-bottom: 80px;
  171. }
  172. section.container.user_content{
  173. background-color: #fff;
  174. }
  175. .container {
  176. position: relative;
  177. margin: 0 auto;
  178. max-width: 1310px;
  179. }
  180. .one{
  181. background-color: #777;
  182. display: inline;
  183. padding: .2em .6em .3em;
  184. font-size: 75%;
  185. font-weight: 700;
  186. line-height: 1;
  187. color: #fff;
  188. text-align: center;
  189. white-space: nowrap;
  190. vertical-align: baseline;
  191. border-radius: .25em;
  192. }
  193. .hh_user_vips:hover {
  194. color: #fff!important
  195. }
  196. .iconfont {
  197. font-family: "iconfont" !important;
  198. font-size: 14px;
  199. font-style: normal;
  200. -webkit-font-smoothing: antialiased;
  201. -moz-osx-font-smoothing: grayscale;
  202. }
  203. .icon-goumai:before {
  204. margin-right: 5px;
  205. content: "e67b";
  206. }
  207. .icon-ziliao:before {
  208. margin-right: 5px;
  209. content: "e68e";
  210. }
  211. .icon-taolun1:before {
  212. margin-right: 5px;
  213. content: "e672";
  214. }
  215. .icon-mima:before {
  216. margin-right: 5px;
  217. content: "e605";
  218. }
  219. .icon-tougao:before {
  220. margin-right: 5px;
  221. content: "e60a";
  222. }
  223. .icon-zuopin:before {
  224. margin-right: 5px;
  225. content: "e68c";
  226. }
  227. style>
  228. <section class="container user_content">
  229. <div class="row test">
  230. <div class="hh_usertop">
  231. <div class="user_av">
  232. echo _get_user_avatar( $user_email, true, 100); ?>
  233. div>
  234. <div class="hh_usertop_right">
  235. <p class="hh_p1">
  236. echo $current_user->nickname;?><span>
  237. echo vip_type_name();?>span>p>
  238. <p class="hh_p2">激活闲置素材价值,重构共享设计理念。p>
  239. <p class="hh_p3"><span class="first one">已下载
  240. echo $user_downData['today_down_num']; ?>次span>
  241. <span class="one">剩余下载
  242. echo $user_downData['over_down_num']; ?>次span>p>
  243. div>
  244. <div class="hh_ziliao">
  245. <form action="/action/avatar.php" method="post" class="" role="form"
  246. name="AvatarForm" id="AvatarForm" enctype="multipart/form-data">
  247. <a class="btn btn-default btn-sm upload" href="javascript:void(0)"><span id="udptips"><i class="kan kankehudingdanhao">i>修改头像span>
  248. <input type="file" name="addPic" id="addPic" accept=".jpg, .gif, .png" resetonclick="true">
  249. a>
  250. form>
  251. <script src="/js/jquery.form.js">script>
  252. <a class="hh_user_vips" href="/vip_free" etap="vip"><i class="kan kanvip1">i>会员特权a>
  253. div>
  254. div>
  255. div>
  256. <div class="row">
  257. <div class="col s12 m12 18">
  258. <div class="user_row">
  259. <ul>
  260. <li><a href="?action=order" class="order " etap="order"><i class="iconfont icon-goumai">i>我的订单a>li>
  261. <li><a href="?action=info" class="info " etap="info"><i class="iconfont icon-ziliao">i>我的信息a>li>
  262. <li><a href="?action=comment" class="comments " etap="comment"><i class="iconfont icon-taolun1">i>我的评论a>li>
  263. if (_hui('is_write')) { ?>
  264. <li><a href="?action=mywrite" class="mywrite " etap="mywrite"><i class="iconfont icon-zuopin">i>我的文章a>li>
  265. <li><a href="?action=write" class="write " etap="write"><i class="iconfont icon-tougao">i>我要投稿a>li>
  266. } ?>
  267. <li><a href="?action=password" class="password " etap="password"><i class="iconfont icon-mima">i>修改密码a>li>
  268. ul>
  269. div>
  270. div>
  271. div>
  272. <div class="row">
  273. <div class="col s12 m12 18">
  274. if (isset($_GET['action'])) {
  275. $part_action = $_GET['action'];
  276. get_template_part( 'pages/user/'.$part_action);
  277. }else{
  278. get_template_part( 'pages/user/index');
  279. } ?>
  280. div>
  281. div>
  282. section>
  283. get_footer(); ?>

会员开通页面整改

会员页面内容比较多,请参考www.apeyizhan.com 如需修改请加qq2263669745(切忌是免费)

页面滚动条美化

在后台自定义css顶部加入如下样式:

  1. ::-webkit-scrollbar {/*滚动条整体样式*/
  2. width: 10px; /*高宽分别对应横竖滚动条的尺寸*/
  3. height: 1px;
  4. }
  5. ::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
  6. background-color: #12b7f5;
  7. background-image: -webkit-linear-gradient(45deg, rgba(255, 93, 143, 1) 25%, transparent 25%, transparent 50%, rgba(255, 93, 143, 1) 50%, rgba(255, 93, 143, 1) 75%, transparent 75%, transparent);
  8. }
  9. ::-webkit-scrollbar-track {/*滚动条里面轨道*/
  10. -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
  11. background: #f6f6f6;
  12. }

整站改为会员制

内容比较多,请参考www.apeyizhan.com 如需修改请加qq2263669745(切忌是免费)

限制所有登录后才可下载/购买

增加登录判断:/rizhuti/inc/codestar-framework/rizhuti/widgets.rizhuti.php

  1. if (!is_user_logged_in()){
  2. $content_pay='<a href="'.home_url('login').'" class="btn btn-primary" etap="login_btn" ><i class="iconfont">i> 登录后可下载a>';
  3. }else{
  4. }
Wordpress日主题美化教程

日主题新增页面模板

增加页面模板后的效果:

Wordpress日主题美化教程
Wordpress日主题美化教程

操作方法如下:在主题根目录下新建php文件内容如下:

  1. /* Template Name: 试验 */ ?>
  2. get_header(); ?>
  3. if( get_post_format() ){ ?>
  4. get_template_part( 'content', get_post_format() ); ?>
  5. }else{ ?>
  6. <section class="container">
  7. //此处编写HTML即可(直接从div开始,不需要body,导航与顶部都有了,编写内容就好了)
  8. section>
  9. } ?>
  10. get_footer(); ?>

日主题修改一分钟下载限制

对于资源下载的时间限制,日主题原生是60秒的限制,可能有些网站对于这个限制感觉太严格,废话不多说,上教程:

原来的:

Wordpress日主题美化教程

代码位置:/rizhuti/action/download.php

修改代码位置19行,把60秒修改成你想要限制的时间,站长修改成了10秒

Wordpress日主题美化教程

隐藏或删除内页资源类型

个人不太喜欢这类型的选项,所以把它删除了,代码在:/rizhuti/category.php这个文件里面的53-59行

原来效果:

Wordpress日主题美化教程

修改后效果:

Wordpress日主题美化教程

删除代码

Wordpress日主题美化教程
建站教程

宝塔面板出现请使用正确的入口登录面板的解决方法

2019-8-30 13:26:03

建站教程

AdSense有不合适的广告出现在网站上要如何处理?

2019-8-30 14:11:08

本站所发布的一切源码、模板、应用等文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版,购买注册,得到更好的正版服务。如有侵权。本站内容适用于DMCA政策。若您的权利被侵害,请与我们联系处理,站长 QQ: 84087680 或 点击右侧 私信:盾给网 反馈,我们将尽快处理。
⚠️
本站所发布的一切源码、模板、应用等文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版,购买注册,得到更好的正版服务。如有侵权。本站内容适用于DMCA政策
若您的权利被侵害,请与我们联系处理,站长 QQ: 84087680 或 点击右侧 私信:盾给网 反馈,我们将尽快处理。
0 条回复 A文章作者 M管理员
欢迎您,新朋友,感谢参与互动!
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
私信列表
搜索