W
W
Web Lizard2016-02-20 12:12:22
WordPress
Web Lizard, 2016-02-20 12:12:22

How to check if the current post has tags or not?

There is a page on which the cycle goes through all the posts. Some posts have tags, some don't.
Question - how to check if the post has tags or not?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pshkll, 2016-02-20
@Lizard-108

Inside the loop

<?php
if(has_tag()){
//если есть теги
}
else{
//если нет тегов
}
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question