Reputation: 1937
with
<?php
if (is_category())
echo single_cat_title();
?>
i can show up the current category title..
how can i insert the tag single_cat_title() into:
<?php
$recent = new WP_Query("cat=10&showposts=4"); while($recent->have_posts()) : $recent->the_post();
if (in_category(10) && in_category(**Insert Here**)) { ?>
i tried it with
if (in_category(10) && in_category('.single_cat_title.')) { ?>
but no chance... thank you!
Upvotes: 0
Views: 133
Reputation: 2368
Probably best to put it into a variable
$cat_title = single_cat_title();
then
if (in_category(10) && in_category($cat_title)) { ?>
Upvotes: 1