2010-01-29 2 views
0

Wordpress : 어떻게 PHP 안에 함수를 넣으시겠습니까? 함께

 <?php 

    if (is_category()) 

    echo single_cat_title(); 

    ?> 

나는 현재 카테고리 타이틀을 표시 할 수 ..로 난 태그 single_cat_title을 (삽입하는 방법

) : 제가

으로 시도

<?php 
$recent = new WP_Query("cat=10&showposts=4"); while($recent->have_posts()) : $recent->the_post(); 

    if (in_category(10) && in_category(**Insert Here**)) { ?> 

if (in_category(10) && in_category('.single_cat_title.')) { ?> 

아니요 기회가 ... 고마워요!

답변

1

아마 가장 변수

$cat_title = single_cat_title(); 

다음

if (in_category(10) && in_category($cat_title)) { ?> 
에 넣어하기
관련 문제