Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.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
Wordpress 对于自定义分类法,我可以使用什么来代替获取_Wordpress_Custom Post Type_Custom Taxonomy - Fatal编程技术网

Wordpress 对于自定义分类法,我可以使用什么来代替获取

Wordpress 对于自定义分类法,我可以使用什么来代替获取,wordpress,custom-post-type,custom-taxonomy,Wordpress,Custom Post Type,Custom Taxonomy,基本上,我在WordPress中创建了一个带有自定义分类法(custom_tax)的自定义帖子类型。现在我已经创建了一个自定义查询,我想在其中获取保存自定义帖子的自定义类别,并将其名称作为字符串输出。我在使用WordPress标准分类法时这样做: //Start the query query_posts(array( 'showposts' => $posts, 'orderby' => 'asc', 'category_name' => $category

基本上,我在WordPress中创建了一个带有自定义分类法(custom_tax)的自定义帖子类型。现在我已经创建了一个自定义查询,我想在其中获取保存自定义帖子的自定义类别,并将其名称作为字符串输出。我在使用WordPress标准分类法时这样做:

//Start the query
   query_posts(array(
  'showposts' => $posts,
  'orderby' => 'asc',
  'category_name' => $category
));

$temp_title = get_the_title();
$temp_link = get_permalink();
$temp_excerpt = get_the_excerpt();
$temp_time = get_the_date('Y-m-d');
$temp_categories = get_the_category(', ');
$temp_author = get_the_author();
$temp_content = get_the_content();
$i++;

$output2 .= "<li class='item' data-id='id-" . $i . "' data-type='" . $temp_categories . "'><a href='" . $temp_link . "' rel='prettyPhoto[portfolio]'><img class='' src='" . $path . "/library/timthumb.php?src=" . $image[0] . "&h=130&w=210&zc=1&q=100' alt='" . $temp_title . "' /></a></li>";
//启动查询
查询职位(数组)(
“showposts”=>$posts,
'orderby'=>'asc',
“类别名称”=>$category
));
$temp_title=获取_title();
$temp_link=get_permalink();
$temp_extract=获取_摘录();
$temp_time=获取日期('Y-m-d');
$temp_categories=获取_类别(',');
$temp_author=获取_作者();
$temp_content=获取_内容();
$i++;
$output2.=“
  • //启动查询
    查询职位(数组)(
    'post_type'=>数组('post','portfolio'),
    “showposts”=>$posts,
    'orderby'=>'asc',
    “类别名称”=>$category
    ));
    $temp_title=获取_title();
    $temp_link=get_permalink();
    $temp_extract=获取_摘录();
    $temp_time=获取日期('Y-m-d');
    $temp_categories=获取_术语(获取_ID(),'custom_cat',',');
    $temp_author=获取_作者();
    $temp_content=获取_内容();
    $i++;
    $output2.=“