Addition Page
-
Hello,
Lots of hours by now I’m trying to add some additional pages with similar functions of /members
Decided to call it /artists for example.
First: Defined on WP_ARTISTS_SLUG to ‘artists’ in bp-core.php
Then I created this function:
function bp_core_action_directory_artists() {
global $bp;
if ( $bp->current_component == BP_ARTISTS_SLUG ) {
$bp->is_directory = true;
$bp->current_component = 'artists';
wp_enqueue_script( 'bp-core-directory-artists', BP_PLUGIN_URL . '/bp-core/js/directory-artists.js', array( 'jquery', 'jquery-livequery-pack' ) );
bp_core_load_template( apply_filters( 'bp_core_template_directory_artists', 'directories/artists/index' ) );
}
}
add_action( 'wp', 'bp_core_action_directory_artists', 2 );in bp-core.php again.
The file that I’m trying to call it’s located in /wp-content/bp-themes/{my-theme}/directories/artists/index.php. But still returns error 404. What more do I have to do so this page to be visible?
Thanks in advance!
- The topic ‘Addition Page’ is closed to new replies.