WordPress DUX主题美化首页顶置标签

WordPress DUX主题美化首页顶置标签

图片[1]-WordPress DUX主题美化首页顶置标签-星云万里

1、修改主题index.php

在主题index.php文件当中搜索第一个excerpt修改成excerpt-主题美化包zd。例如一下

 get_template_part( 'excerdux主题修改pt-主题美化zd' );//置顶美化主题美化大师免费下载

图片[2]-WordPress DUX主题美化首页顶置标签-星云万里

 

2、新建excerpt-zdwordpress.php

新建一个excerpt-zd.php, 然后把下方内容复制粘贴进去,然后上传到DUX主wordpress狮子歌歌斯文败类题根目录

<?php
/**
 * Used for index/archive/search/author/catgory/tag.
 *
 */
$ii = 0;
w主题美化app下载hile ( have_posts() ) : the_post(wordpress); 
 $_thumb = _get_post_thumbwordpress主题nail();
 $_excerpt_text = '';
 if( _hui('list_tywordpress官网入口pe')=='text' || (_hui('list_WordPresstype') == 'thumb_if_has' && strstr($_thumb, 'data-thumb="wordpress官网入口default"')) ){
 $_excerpt_text = ' excerpt-text';
 }
 $ii++;
 echo主题美化app '<art主题美化包icle class="excerpt excerpt-'.$ii. $_excerpt_text .' excerpt-zd">';
 if( _hui('lisDUX主题美化t_type') == 'thumb' ){
 echo '<a'._post_target_blank().' class="focus" href="'.get_perm主题美化下载免费下载alink().'">'.$_twordpress主题humb.'</a>';
 }else if( _hui('list_ty主题美化大师pe') == 'thumb_if_has' &&dux主题修改; !strstr($_thumb, 'data-thumb="default"') ){
 echo '<a'._post_target_blank(主题美化下载免费下载).' class="focus" href="'.get_permalink().'">'.$_thumb.'&主题美化下载免费下载lt;/a>';
 }
 echo '<header>';
 if( _hui('post_plugin_cat') && !is_category() ) {
 $category = get_the_category();
 if($category[0]){
 echo '<a class="cat" href="'.get_category_lin大前端dux主题k($c主题美化appategory[0]->term_id ).'">'.$category主题美化助手[0]->cat_name.'<i></i></a> ';
 }
 };
 echo '<h2&主题美化大师gt;<a'._post_target_blank().' href="'.get_permalink().'" title="'.get_t主题美化包he_title().get_the_subt主题美化itle(f主题美化alse)._get_delimiter().get_bloginfo('name').'">'.get_the_title().get_the_大前端dux主题subtitle().'</a></h2>'; 
 
 echwordpress主题o '</header&主题美化下载安装gt;';
 echo '&dux主题设置lt;p clasdux主题修改s="meta">';

 if( _hui('post_plugin_date') ){
 echo '<time><i clas主题美化app下载s="fa fa-clock-o"></i>'.get_the_time('Y-m-d').'</time>';
 }
 if( _hui('post_plugin_author') ){
 $author = get_the_author();
 if( _hui('author_ldux主题修改ink') ){
 $author = '<a href="'.get_author_po主题美化下载免费下载sts_url( get_the_autwordpress下载hor_meta( 'ID' ) ).'">'.$author.'</a>';
 }
 e主题美化大师cho '<span class="author"><i class="fa主题美化大师下载 fa-user"></i>'.$author.'</span>';
 }
 if主题美化包( _hui('post_plugin_view') ){
 echo '<span class="pv"><i class="fa fa-eye"></i>'._get_post_views().'</spawordpress怎么看别人的文章n>dux主题修改';
 }
 if ( comments_open() &&主题美化包amp; _h主题美化助手ui(主题美化大师免费下载'post_pdux主题修改lugin_comm') ) {
 echo '<a class="pc" href=wordpress狮子歌歌斯文败类"'.get_comm主题美化大师免费下载ents_link().'"><i clwordpress下载ass="fa fa-commentsdux主题设置-o"></i>评论('.get_comments_number('0', '1', '%'大前端dux主题).')</a>';
 }
 echo '</p>';
 ewordpress下载cho '<p claswordpress狮子歌歌斯文败类s="note">'._get_excerpt().'</p>';
 if( _hui('post_link_exc主题美化下载免费下载erpt_s') ) _moloader('mo_post_link');
 echo '<span class="zd">置顶&wordpress狮子歌歌斯文败类lt;/span>';
 echo '</article>';
endwhile;

3、修改main.css

把下面代码加到main.css文件的最后面。

.excerpt-zd {
 position: relative;
}
.excerpt-zd .zd {
 positdux主题修改ion: absolute;主题美化app
 right: -38px;
 t主题美化助手op: -16px;
 disDUX主题美化play: block;
 widthwordpress: 76px;
 height: 20px;
 line-height: 20px;
 background: #ff5e52;
 color: #fff;
 font-size: 14px;
 font-weight: 400;
 text-DUX主题美化align: center;
 transform:wordpress下载 rotate(45deg);
 transform-orwordpress狮子歌歌igin: 0% 0%;
}
© 版权声明
THE END
喜欢就支持一下吧
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容