一直以來沒有設定自動版權資訊,老是在文章結尾的時候標註一下。最近時間緊迫發現了,自動版權資訊的作用。於是我無意中看到了的部落格,感覺文字框還不錯,就用 Chrome 檢視其 CSS 樣式,結合 WordPress 簡單的函式得到了我現在的版權資訊:

image

具體步驟如下:

開啟後臺編輯,選擇 Single.php 找到 <?php the_content(__('Read more', 'piano-black')); ?>

在其下方加入如下程式碼 (提醒確保 CSS 中的樣式名無重複,重複的話就去修改一下名字)

 <div style="border:1px dashed #ddd; padding:10px; margin:10px 0;line-height:26px;border-radius: 3px;"><div> » <b> 本文連結:</b><a rel="bookmark" title="<?php the_title(); ?>" href="<?php%20the_permalink();%20?>"><?php echo wp_get_shortlink(); ?></a></div><div> » <b> 訂閱本站:</b><a title="Quicl』sBlog" href="http://feed.***.com" rel="external nofollow">http://feed.***.com</a></div><div> » <b> 轉載請註明來源:</b><a title="Quicl』sBlog" href="http://***.com" rel="external nofollow">Quicl』sBlog</a> » <a rel="bookmark" title="<?php the_title(); ?>" href="<?php%20the_permalink();%20?>"> 《<?php the_title(); ?> 》</a></div></div>

OK,現在重新整理一下你的文章,就會看到這個嘍!本文 《WordPress 文章自動新增版權資訊》 。