Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can I use get_the_tags($id).? it returns empty ?


  • amitrwt
    Participant

    @amitrwt

    I’m trying to search topics with particular tags and I’m using get_the_tags($id) where $id is topic id ofcourse. But it returns empty array even though the topic has tags associated to it.? What is the native bbpress function for this if there is any.?

Viewing 1 replies (of 1 total)

  • amitrwt
    Participant

    @amitrwt

    What I want to do eventually is check whether a topic has a specific tag. Like we check with has tag.

    
    if ( has_tag( $tag, $topic_id)) {
    	echo "exists";
    }else{
    	echo "does not exists";
    }
    
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar