通过简单的修改,可以使用HotNews主题CMS最新文章模块,调用显示博主推荐的文章。
打开HotNewsPRoincludes目录的new_post.php模版文件,将第4行的:
<?phpquery_posts('&showposts='.$scrollcount.'&caller_get_posts=10.&cat='.get_option('swt_new_exclude'));while(have_posts()):the_post();$do_not_duplicate[]=$post->ID;?>
改为:
<?phpquery_posts('meta_key=push&showposts='.$scrollcount.'&caller_get_posts=10.&cat='.get_option('swt_new_exclude'));while(have_posts()):the_post();$do_not_duplicate[]=$post->ID;?>
之后,通过添加自定义栏目:push(如图下图)实现调用指定的文章,其它原主题控制面板功能,如:显示数量等不变。
其中:push,可以根据自己的喜好改为其它名称。
注:修改模版,请在后台主题编辑功能中修改,或者使用Notepad++文本编辑软件,决不能用系统自带的记事本,否则可能会造成错位或乱码。