Grab topic IDs from forum ID
-
Hello,
I have a plugin that is used to index search results in to Amazon CloudSearch. I’ve written the below code to exclude private forums from search results. Now I need some code to automatically exclude all topics inside a private forum.
function exclude_private_forums_search() { $forum_id = bbp_get_forum_id(); if (get_post_status($forum_id) == 'private') { add_post_meta($forum_id, 'acs_exclude', 1, true ); } else { delete_post_meta($forum_id, 'acs_exclude'); } } add_action('bbp_new_forum', 'exclude_private_forums_search' ); add_action('bbp_edit_forum', 'exclude_private_forums_search' );
Is there anyway I can get a list of topic IDs inside a forum ID?
Running latest version of bbPress and WordPress.
Thanks.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- You must be logged in to reply to this topic.