<?php if (has_tag('abc') && (in_category('d')) { echo '<div class="xxx">' ; } else { echo '<div class="yyy">' ; } ; ?>
Im using the above but it returns an error, am i doing anything wrong? Thanks for looking
<?php if (has_tag('abc') && (in_category('d')) { echo '<div class="xxx">' ; } else { echo '<div class="yyy">' ; } ; ?>
Im using the above but it returns an error, am i doing anything wrong? Thanks for looking
You must be logged in to post a comment.
You are missing a closing parentheses
)
in your if statement.Fix it to this:
There are syntax errors in your code try this
has_tag and in_category only works in WordPress loop if you do not pass post id as second parameter.