Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

  • anbusurendhar
    Participant

    @anbusurendhar

    https://buddypress.org/support/topic/make-your-own-custom-buddypress-page/.

    The snippet I found in the above link is as below:

    
    define('BP_EXAMPLE_SLUG', 'fun');
    
    function bp_show_example_page() {
    
    global $bp, $current_blog;
    
    if ( $bp->current_component == BP_EXAMPLE_SLUG && $bp->current_action == '' ) {
    
    // The first variable here must match the name of your template file below
    
    bp_core_load_template( 'fun', true );
    
    }
    
    }
    
    add_action( 'wp', 'bp_show_example_page', 2 );
    

    anbusurendhar
    Participant

    @anbusurendhar

    Sorry the link is Link. My mistake


    anbusurendhar
    Participant

    @anbusurendhar

    In buddypress, activity, members, group have a definite pages like ‘domain/activity’, ‘domain/members’, ‘domain/group’, respectively. Likewise I’m trying to create my own custom page like ‘domain/mycustom’.

    For this purpose I referred John James Jacoby’s Post in here. The snippet used in that link didn’t work for me. I don’t know where I’m missing.

    From that snippet, I found that $bp->current_component returns me an empty string.


    anbusurendhar
    Participant

    @anbusurendhar

    @danbp : Thank You very much for your reply.

    Even I’ve tried bp_current_component() and bp_is_current_component() functions with no success.

    Actually this function works fine when used in default buddypress pages like domain/activity/. This returns me “activity”, which is exactly correct. But when I tried this in my custom page (domain/custompage), I’m getting an empty string.

Viewing 4 replies - 1 through 4 (of 4 total)
Skip to toolbar