wordpress 根据文章ID获取分类ID和标签ID
//wordpress 根据文章ID获取分类ID $category=get_the_category( $post_ID ); $len= count($category); for($i=0;$i<$len;$i++){ $catid[] =$category[$i]->term_id; } print …
//wordpress 根据文章ID获取分类ID $category=get_the_category( $post_ID ); $len= count($category); for($i=0;$i<$len;$i++){ $catid[] =$category[$i]->term_id; } print …
用wordpress的朋友都遇到过很多主题的用户头像没办法加载的情况。主要原因是wordpress的 Gravatar 头像服务器被大陆屏蔽了。网上也有解决方案,就是把 Gravatar 头像替换成多说的,即在 functions文件中添加如下代码: function duoshuo_avatar($avatar) { …
wordpress获取随机文章 <?php $randargs = array( ‘ignore_sticky_posts’ => 1 ,//取消文章置顶 如果不加这一行,输出的文章将包括设置的置顶文章 ‘showposts’ => 10,//文章数量 …
给wordpress长文章批量分页功能的php代码,残冰在此以图片类文章为例 <?php set_time_limit(0); ini_set(“memory_limit”,”2000M”); echo “<meta http-equiv=R …