您好,欢迎光临! 推荐您使用Chrome浏览器访问本站。

为自己的WordPress blog添加版权信息

1,068 views
为自己的WordPress blog添加版权信息打开主题下的 functions.php 文件,在最后添加如下代码,将内容修改成你想要的样子。 代码如下: <pre>function feed_copyright($content) { if(is_single() or is_feed()) { $content.= "<p class='crinfo'>"; $content.= '&raquo; 版权所有:<a title="owoer" href="http://www.iswz.net/">Themeidea</a> &raquo; <a rel="bookmark" title="'.get_the_title().'" href="'.get_permalink().'">......

延时摄影:冰岛·午夜阳光

1,031 views
延时摄影:冰岛·午夜阳光

php时间显示几分钟前几天前

871 views
php时间显示几分钟前几天前 function ForStrdate ($time) { $now = time(); $interphase = $now - $time ; $return = ''; if ( $interphase >= 0) { $temp = $interphase/60; if ($temp < 60) { if (floor($temp) == 0) { $return = '刚刚'; } else { $return = floor($temp).'分钟前'; } }elseif ($temp < 3600) { $return = floor($temp/60).'小时前'; }elseif ($temp < 43200) { $return = floor($temp/(60*24)).'天前'; }else { $return = date('Y年m月d日',$time); } } els......

wordpress缩略图

859 views
wordpress缩略图将以下代码贴入主题的function.php文件: //缩略图获取 add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 140, 98 ,true );//设置缩略图的尺寸 function dm_the_thumbnail() { global $post; // 判断该文章是否设置的缩略图,如果有则直接显示 if ( has_post_thumbnail() ) { echo '&lt;a href="'.get_permalink().'"&gt;'; the_post_thumbnail(); echo '&lt;/a&gt;'; } else { //如果文章没有设置缩略图,则查找文章内是否包含图片 $content = $post-&gt;post_conte......

wordpress添加面包屑导航

920 views
wordpress添加面包屑导航wordpress添加面包屑导航 编辑主题,在function.php文件里加上以下内容: /*BREADCRUMB*/ function the_breadcrumb() { if (!is_home()) { echo '<a href="'; echo get_option('home'); echo '">'; echo "首页"; echo "</a> > "; if (is_category() || is_single()) { single_cat_title(); if (is_single()) { the_category(', '); echo " > "; echo "正文"; } } elseif (is_page()) { echo the_title(); } elseif (is_tag()) { echo '......