• Resolved stevehammatt

    (@stevehammatt)


    I’ve created a new taxonomy via CPTUI, which I want to apply to all replies in bbPress other than those for a particular forum. But I’m having trouble tracking down what I need to do to set this, because unless I’m missing something the bbPress documentation is very much a work-in-progress.

    I know that I’m going to have to modify bbp_insert_reply(), that’s fine. But I’m still learning my way around WordPress development and am struggling to figure out how to modify the reply post to add its taxonomy.

    Edit – I just need to alter the call to wp_insert_post() to add the data for the tax_input array, adding my specified taxonomy, right?

    Apologies for asking here (I’m getting no response so far in bbPress-land), but I’d be very grateful if someone could point me in the right direction (maybe someone here has done something similar before?).

    Thanks.

    • This topic was modified 6 years, 9 months ago by stevehammatt.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Honestly not sure exactly what all you’ll need to do to get your integration complete, as I’ve never tried to add taxonomies to the bbPress replies post type.

    In regards to CPTUI itself, I can see and confirm that bbPress’ post types do show up when creating a taxonomy. So in that regard, CPTUI’s job is done. We don’t have a hand in things beyond that.

    It sounds like you’re trying to determine the best point to assign terms to the replies, like when a user is typing up a reply, they select some terms and then hit submit. At that point, you are needing to assign the submitted terms?

    Thread Starter stevehammatt

    (@stevehammatt)

    Thanks for the reply. I realise that asking how I do it exactly in bbPress is way off-topic here, sorry. Actually what I’m doing should be simpler than what you suggest, all I need to do is to test whether the forum this reply is for is anything other than my “special” forum, and if it passes that test (not “special”) then I simply add the taxonomy terms to the reply post. I’ll look up how to do that bit in the WP Codex. It’s just unfortunate that the bbPress documentation isn’t complete, but I understand that it needs more crowdsourcing to complete that – I’ll carry on digging in the bbPress code too. Thanks.

    Yeah I’m happy that CPTUI has done its job with the taxonomy, because another plugin is showing the new taxonomy as an option for filtering on the bbPress reply post type. So, good job, CPTUI.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Wish I could have been more direct help, but hopefully you get things worked out for your needs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding taxonomy to bbPress replies’ is closed to new replies.