Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display page under my slug /map

  • @johannesfosseus

    Member

    Hi all

    I’m new to bp and trying to build a plugin that shows up under “www.domain.com/map” and I have big trouble to get anything else then “Page not found” displayed on the page.

    I have registered a slug and added the plugin as “active_components”, searched the forum, read the docs but still…

    How do I display a page under my slug “/map” ?

    all the best // Johannes

Viewing 1 replies (of 1 total)
  • @r-a-y

    Keymaster

    You might be missing a template action in your component.

    This is how groups does it:
    function groups_directory_groups_setup() {
    global $bp;

    if ( $bp->current_component == $bp->groups->slug && empty( $bp->current_action ) && empty( $bp->current_item ) ) {
    $bp->is_directory = true;

    do_action( 'groups_directory_groups_setup' );
    bp_core_load_template( apply_filters( 'groups_template_directory_groups', 'groups/index' ) );
    }
    }
    add_action( 'wp', 'groups_directory_groups_setup', 2 );

    Also this might apply to you:
    https://buddypress.org/community/groups/creating-extending/forum/topic/custom-plugin-hook-bp_setup_globals-is-not-fired/

Viewing 1 replies (of 1 total)
  • The topic ‘Display page under my slug /map’ is closed to new replies.
Skip to toolbar