Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 编辑Wordpress代码以显示帖子类型_Php_Wordpress - Fatal编程技术网

Php 编辑Wordpress代码以显示帖子类型

Php 编辑Wordpress代码以显示帖子类型,php,wordpress,Php,Wordpress,有没有一种方法可以编辑以下内容,这样它就可以从特定类别中引入帖子,而不是引入最新的帖子 if(!function_exists('zolo_recent_posts')){function_recent_posts($atts,$content=null){ob_start();extract(shortcode_atts(数组(“num”=>'4','columnsizepost'=>,'data_animation'=>'fadeInDown','data_delay'=>'0'),$att

有没有一种方法可以编辑以下内容,这样它就可以从特定类别中引入帖子,而不是引入最新的帖子

if(!function_exists('zolo_recent_posts')){function_recent_posts($atts,$content=null){ob_start();extract(shortcode_atts(数组(“num”=>'4','columnsizepost'=>,'data_animation'=>'fadeInDown','data_delay'=>'0'),$atts));global$post;
查询_posts('post_type=post&posts_per_page='.$num.&paged='.@$paged);?>

使用这种方式,您可以在WordPress中获取特定类别的帖子。



通过这种方式,你可以在WordPress中获取特定类别的帖子。

当然……有时看不到树木的树木。谢谢。当然……有时看不到树木的树木。谢谢。当然……有时看不到树木的树木。谢谢。
<?php query_posts('category_name=CATEGORYNAME&showposts=5');
  while (have_posts()) : the_post();
  // do whatever you want
?>
<b><a href="<?php the_permalink() ?>" title="Permanent Link to <?php      the_title(); ?>"><?php the_title(); ?></a>
<?php
 endwhile;
 ?>