$my_query = new WP_Query('category_name=frontpage&showposts=1');
while ($my_query->have_posts()) :
$my_query->the_post();
$do_not_duplicate = $post->ID;
if (have_posts()) : while (have_posts()) : the_post(); //do stuff like format each postendwhile;
if (have_posts()) : while (have_posts()) : the_post();
if( $post->ID == $do_not_duplicate )
continue;//do stuff like format each post endwhile;
以上就是安达网络工作室关于《如何给wordpress创建动态的置顶文章短工夫引起注意》的一些看法。更多内容请查看本栏目更多内容!
wordpress头部的代码十分多,包括WordPress版本,前后文、第一篇文章、主页meta信息等各种冗余代码,这些对...
WordPress 简码是一品种似于论坛标签的货色,格局相似于把尖括号换成中括号的 Html 标签。简码很多人叫做短...
comments_template()(获取评论模板) comments_template() 函数用来获取评论模板,普通只能用在文章或许页...
自从用了阿里云主机,真是没有省心过。 这两天网站CPU天天100+的,过一会就挂了,原来是wp-cron.php文件造成...
复制代码代码如下: //该办法为向曾经存在的菜单中增加子菜单 function add_submenu() { add_submenu_page( ...
阻拦英文渣滓评论 因为绝大少数的渣滓评论都是英文的,所以国际不少冤家在应用 Some Chinese Please 插件,...