Skip to:
Content
Pages
Categories
Search
Top
Bottom

get topics by tags?


  • briancostea
    Participant

    @briancostea

    How would I get all of the threads that use a specific tag? I am creating a plugin that uses bbp_has_topics and bbp_topics so I think I need to set the meta_key value to something to filter the result set. Can anyone let me know what value I can use?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The taxonomy ID for tags is “topic-tag”. You don’t want to set the meta_key, however.

    You can do it in a couple of ways. One is to use the “tax_query” parameter.

    You could also pass a parameter like the following to your query:

    'topic-tag' => array('tag-1', 'tag-2')
    

    Does that help?


    briancostea
    Participant

    @briancostea

    It does — I figured this out 2 weeks ago but for some reason you can’t reply to your own post here until someone else does. Nice design.

    Hmm, that’s strange. Could have been a random bug because I see people reply to their own topics all the time.

    Anyhow, glad it’s working for you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar