• Resolved klo-wp

    (@klo-wp)


    Hello,

    I am working with making some condition in a wordpress theme and I want to know what is the difference between is_tag() versus has_tag().

    Why I can use ID in has_tag() but not is_tag()?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • is_tag() returns true if you’re viewing a tag archive page. has_tag( 'foo' ) returns true if the current post has the tag “foo”.

    Thread Starter klo-wp

    (@klo-wp)

    thank for the reply. now i see how it works 🙂 i was struggling with has_tag() a lot

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘is_tag() versus has_tag()’ is closed to new replies.