bb_ld_group_archive_slug_change( array $post_options, string $post_type )
Filter to fix conflict between Learndash Plugin groups archive page and Platform Groups page.
Description
Parameters
- $post_options
-
(Required) An array of post options.
- $post_type
-
(Required) Post type slug.
Return
(array) $post_options
Source
File: bp-integrations/learndash/bp-learndash-filters.php
function bb_ld_group_archive_slug_change( $post_options, $post_type ) { $page_ids = bp_core_get_directory_page_ids(); if ( bp_is_active( 'groups') && is_array( $page_ids ) && isset( $page_ids['groups'] ) && !empty( $page_ids['groups'] ) && learndash_get_post_type_slug( 'group' ) === $post_type ) { $post_options['rewrite']['slug'] = 'ld-groups'; } return $post_options; }
Changelog
Version | Description |
---|---|
BuddyBoss 1.4.7 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.