Skip to:
Content
Pages
Categories
Search
Top
Bottom

Accept and Reject for groups Button Missing


  • Nomi
    Participant

    @naumanahmed19

    I have wasted too much time on this.. If you could help me that would be great.

    I am creating buddypress compatible theme. Everything works fine but these two buttons for groups are not displaying. It works on wordpress default theme. I added a string to check conditions and its fine and displaying string but these buttons are no where in html

    <?php bp_button( array( 'id' => 'group_membership_accept', 'component' => 'groups', 'wrapper_class' => 'accept', 'link_href' => bp_get_group_request_accept_link(), 'link_title' => __( 'Accept', 'buddypress' ), 'link_text' => __( 'Accept', 'buddypress' ) ) ); ?>
    
    					<?php bp_button( array( 'id' => 'group_membership_reject', 'component' => 'groups', 'wrapper_class' => 'reject', 'link_href' => bp_get_group_request_reject_link(), 'link_title' => __( 'Reject', 'buddypress' ), 'link_text' => __( 'Reject', 'buddypress' ) ) ); ?>
    
Viewing 8 replies - 1 through 8 (of 8 total)

  • shanebp
    Moderator

    @shanebp

    Use bp_get_button


    Nomi
    Participant

    @naumanahmed19

    okay i used bp_get_button but still no luck. then I removed requests-loop.php from theme buddypress folder that it can use plugin’s requests-loop.php still its not displaying


    shanebp
    Moderator

    @shanebp

    Assign the button to a var, then dump it to see what is returned.

    $asdf = bp_get_button( etc. ) 
    var_dump( $asdf ); 

    Your bp_button calls look ok, afaik.

    Take a look at the function
    buddypress\bp-core\bp-core-template.php ~L. 487


    Nomi
    Participant

    @naumanahmed19

    @shanebp thanks for your help. I don’t know what was the problem but its working now.


    Nomi
    Participant

    @naumanahmed19

    Okay again buttons have disappeared ..

    var_dump() returns NULL


    shanebp
    Moderator

    @shanebp

    Do you have debug turned on in wp-config.php ?


    Nomi
    Participant

    @naumanahmed19

    yes. Some time it appears quickly after making a request and some time it take too much time. Should I send you site details?


    shanebp
    Moderator

    @shanebp

    It’s probably something about how you built the theme.
    So the issue appears re bp_button, but is actually due to something else.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Accept and Reject for groups Button Missing’ is closed to new replies.
Skip to toolbar