文章内容页底部添加版权代码

标签: ,

正在查看 2 个帖子:1-2 (共 2 个帖子)
  • 作者
    帖子
  • clarance
    参与者
    • 文章数量: 10
    @clarance
    楼主

    你好,我这边通过后台’ 主题生成’ 进行替换所有文章内容页的样式修改,发现原来添加的底部版权等样式没有生效,请问要怎么修改?

    附上原修改代码:

     

     

    <!– 标签调用 –>
    <div id=”article-tag”>
    <?php the_tags(‘ 标签: ‘, ‘ , ‘ , ”); ?>
    </div>
    <!– 标签调用 end–>
    <!– 文章版权信息 –>
    <?php $custom_fields = get_post_custom_keys($post_id);
    if (!in_array (‘copyright’, $custom_fields)) : ?>
    <div class=”postcopyright” style=”background-color:#eeeeee”>
    <div> 版权声明:除非注明,否则均为 DataFocus 企业大数据分析系统 原创文章,转载请以链接形式标明本文地址。否则将追究法律责任。</div>
    <div> 转载请注明来源:” title=”<?php the_title(); ?>”><?php the_permalink() ?><!– ” title=”<?php bloginfo(‘name’); ?>”><?php bloginfo(‘name’); ?> –></div>
    </div>
    <?php else: ?>
    <?php $custom = get_post_custom($post_id);
    $custom_value = $custom[‘copyright’]; ?>
    <div class=”postcopyright” style=”background-color:#eeeeee”>
    <div> 版权声明: 转载作品,本文来源于 ” target=”_blank” style=”text-decoration:underline”><?php echo $custom_value[0] ?> ,由 (” title=”<?php bloginfo(‘name’); ?>”> <?php the_author(); ?> ) 整编而成。</div>
    <br/>
    <div>↘原文地址: ” ><?php echo $custom_value[0] ?></div>
    </div>
    <?php endif; ?>
    <!– 文章上一篇下一篇 –>
    <div class=”post-navigation”>
    <?php
    $categories = get_the_category();
    $categoryIDS = array();
    foreach ($categories as $category) {
    array_push($categoryIDS, $category->term_id);
    }
    $categoryIDS = implode(“,”, $categoryIDS);
    ?>
    <div class=”post-previous”>
    <?php if (get_previous_post($categoryIDS)) { previous_post_link(‘ 上一篇: %link’,’%title’,true);} else { echo “ 上一篇: 已是最后文章”;} ?></div>
    <div class=”post-next”>
    <?php if (get_next_post($categoryIDS)) { next_post_link(‘ 下一篇: %link’,’%title’,true);} else { echo “ 下一篇: 已是最新文章”;} ?></div></div>
    <!– 文章上一篇下一篇-end –>

    诗语
    管理员
    • 文章数量: 5,925
    @feibisi

    看下面帖子,已经给了详细说明,添加代码你要添加到子主题的  functions.php  文件里。

    https://bbs.weixiaoduo.com/topic/29783

正在查看 2 个帖子:1-2 (共 2 个帖子)
  • 哎呀,回复话题必需登录。

话题信息

  • 当前位于:Divi
  • 1 条回复
  • 2 个参与人
  • 最后回复:<a href="https://bbs.weixiaoduo.com/users/feibisi/" title=" 查看诗语的个人资料" class="bbp-author-link"><span class="bbp-author-name"> 诗语</span></a>
  • 上次活动:<a href="https://bbs.weixiaoduo.com/topic/37703/#post-37704" title=" 回复至:文章内容页底部添加版权代码">4 年、 3 月前</a>