6 Star 11 Fork 1

天龙八部999 / dajiaForWordpress

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sidebar.php 1.57 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
乡村搬运工 提交于 2014-09-05 22:57 . 部署
<?php error_reporting(0);?>
<div class="sidebar">
<div class="widget">
<div class="widget-title">
<h3>博客信息</h3>
</div>
<div class="tagcloud"> <a href='javascript:void(0)' class='tag-link-17' style='font-size: 14px;'>评论总数:<?php echo $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments");?></a> <a href="'javascript:void(0)">博客运营:<?php
$starttime = get_option('mytheme_starttime');echo floor((time()-strtotime($starttime))/86400); ?></a> <a href='javascript:void(0)' class='tag-link-16' style='font-size: 14px;'>文章总数:<?php $count_posts = wp_count_posts(); echo $published_posts = $count_posts->publish;?></a>
<div style="max-width:424px;overflow:hidden;margin-top:5px;margin-bottom:0px;">
<?php echo get_option('mytheme_info_bottom');?>
</div>
</div>
</div>
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar() ) : ?>
<?php endif; ?>
<div class="widget">
<div class="widget-title">
<h3>随机文章</h3>
</div>
<ul>
<?php $rand_posts = get_posts('numberposts=10&orderby=rand');foreach($rand_posts as $post) : ?>
<li><a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a></li>
<?php endforeach;?>
</ul>
</div>
<?php if(is_home()){ ?>
<?php
echo "<div class='widget tagcloud'><div class='widget-title'><h3>友情链接</h3></div>";
get_links(-1, "<a>", "</a>","", false, "id",false,false, -1,false, true);
echo "</div>";
}else{?>
<?php } ?>
</div>
PHP
1
https://gitee.com/tianlong999/dajiaForWordpress.git
git@gitee.com:tianlong999/dajiaForWordpress.git
tianlong999
dajiaForWordpress
dajiaForWordpress
master

搜索帮助

14c37bed 8189591 565d56ea 8189591