i did it by modifying the plugin itself. here are the snippets from the two files that i modified
addon-hierarchy.php
` function __construct() {
// Make sure that the bp_docs post type supports our post taxonomies
add_filter( ‘bp_docs_post_type_args’, array( $this, ‘register_with_post_type’ ) );
// Hook into post saves to save any taxonomy terms.
add_action( ‘bp_docs_doc_saved’, array( $this, ‘save_post’ ) );
// Display a doc’s parent on its single doc page
add_action( ‘bp_docs_single_doc_meta’, array( $this, ‘show_parent’ ) );
add_action( ‘bp_docs_parent_tab’, array( $this, ‘show_parent’ ) );
// Display a doc’s children on its single doc page
add_action( ‘bp_docs_single_doc_meta’, array( $this, ‘show_children’ ) );
add_action( ‘bp_docs_children_tab’, array( $this, ‘show_children_tab’ ) );
}
function show_children_tab() {
global $bp;
// Get the child posts
$child_posts_args = array(
‘post_type’ => $bp->bp_docs->post_type_name,
‘post_parent’ => get_the_ID()
);
$child_posts = new WP_Query( $child_posts_args );
// Assemble the link data out of the query
$child_data = array();
if ( $child_posts->have_posts() ) {
while ( $child_posts->have_posts() ) {
$child_posts->the_post();
$child_id = get_the_ID();
$child_data[$child_id] = array(
‘post_name’ => get_the_title(),
‘post_link’ => bp_docs_get_doc_link( $child_id )
);
}
}
$child_data = apply_filters( ‘bp_docs_hierarchy_child_data’, $child_data );
// Create the HTML
$html = ”;
if ( !empty( $child_data ) ) {
foreach( $child_data as $child ) {
$children_html = ‘
‘ . $child . ‘
‘;
echo $children_html;
}
}
} `
integration-groups.php
`
<a href="root_domain . ‘/’ . $groups_slug ?>/slug ?>/bp_docs->slug ?>/post_name ?>”>
`