我想呼应一下自定义分类法中的术语名称\'recipes\'
但我得到的只是“食谱”这个词,它应该是“比萨饼食谱”。是name
这是正确的论点,否则我就错了slug
?
<?php
$term = get_terms( \'recipes\' );
echo \'<div class="title">\' . $term->name . \'recipe</div>\';
我想呼应一下自定义分类法中的术语名称\'recipes\'
但我得到的只是“食谱”这个词,它应该是“比萨饼食谱”。是name
这是正确的论点,否则我就错了slug
?
<?php
$term = get_terms( \'recipes\' );
echo \'<div class="title">\' . $term->name . \'recipe</div>\';
我设法解决了这个问题,我将发布答案:
<?php
$args = array(\'number\' => \'1\',);
$terms = get_terms(\'recipes\', $args );
foreach( $terms as $term ){
echo \'<div class="title">\' . $term->name . \'recipe</div>\';
}
<form class=\"search-form\" action=\"<?php echo home_url( \'/suche/\' ); ?>\" method=\"get\"> <input type=\"text\" name=\"s\" class=\"s\" value=\"<?php the_search_query(); ?>\" /> 这是我的searchform.php 样板你知道为什么在搜索例如“