georgerobbo
Member
Posted 2 years ago #
Can someone help me with this PHP IF statement. I want to say if the single_month_title is true then do nothing but if it isn't set then display the category.
<?php if(isset($_GET['single_month_title'])) { } else { ?><?php the_category(); ?><?php }; ?>
<?php
$smt= single_month_title( '',false );
if ($smt) {
echo $smt;
} else {
the_category();
}
?>
Because of the_category(), use this in The Loop.
Related:
Stepping Into Template Tags
Stepping Into Templates
Template Hierarchy
Template_Tags/single_month_title