Skip to:
Content
Pages
Categories
Search
Top
Bottom

Member Header Buttons Do Not Show


  • clicken
    Participant

    @clicken

    WP:4.9.8
    BP:2.2.0
    Template: Foundation Press Child
    The site maintenance Mode is switched on and off to test the pages.
    Buttons do not show in Twenty Sixteen or Twenty Seventeen.
    Unistalled BuddyPress and re-installed.

    Source code:
    <div class="member-header-actions action"> </div></div><!-- #item-header-content -->

    member-header.php

    /**
    * BuddyPress - Users Header
    *
    * @since 3.0.0
    * @version 3.0.0
    ...
    <?php bp_nouveau_member_header_buttons( array( 'container_classes' => array( 'member-header-actions' ) ) ); ?>
    </div><!-- #item-header-content -->

    Please advise, thank you!

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

  • Prashant Singh
    Participant

    @prashantvatsh

    add_action( 'bp_member_header_actions' ,'ps_test_action');
    
    function ps_test_action(){
    echo 'Test';
    }

    Please paste this code in your child theme’s functions.php file and check if it is printing ‘Test’ there or not. Also please check if you have enabled friendship and other options in BuddyPress settings.

    Thanks


    clicken
    Participant

    @clicken

    Yes! test prints where the buttons should be.


    Prashant Singh
    Participant

    @prashantvatsh

    Hi,

    The actions are there and it will be visible on other member profile’s https://prnt.sc/l2aky1. I think you are viewing your own that’s why you are not getting that. Also you are checking in wrong file, it is coming from cover-image-folder.php and this is the code

    bp_nouveau_member_header_buttons(
    				array(
    					'container'         => 'ul',
    					'button_element'    => 'button',
    					'container_classes' => array( 'member-header-actions' ),
    				)
    			);

    Thanks


    clicken
    Participant

    @clicken

    I really appreciate your help Prashant,

    I am viewing the page in a different virtual machine using a subscriber account that I set up to test. There are two similar files, member-header.php and cover-image-header.php

    This source code matches the member-header.php

    <div id="item-header-avatar">

    Profile picture of Clicken<noscript>Profile picture of Clicken</noscript>

    </div><!-- #item-header-avatar -->

    <div id="item-header-content">

    <h2 class="user-nicename">@clicken</h2>

    <div class="item-meta">

    <span class="activity">active right now</span>
    </div><!-- #item-meta -->

    <div class="member-header-actions action"> Test</div></div><!-- #item-header-content -->

    member-header.php displays the #item-meta before the buttons, as did the test code you supplied.

    <div id="item-header-avatar">
    ">

    <?php bp_displayed_user_avatar( 'type=full' ); ?>


    </div><!-- #item-header-avatar -->

    <div id="item-header-content">

    <?php if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) : ?>
    <h2 class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></h2>
    <?php endif; ?>

    <?php bp_nouveau_member_hook( 'before', 'header_meta' ); ?>

    <?php if ( bp_nouveau_member_has_meta() ) : ?>
    <div class="item-meta">

    <?php bp_nouveau_member_meta(); ?>

    </div><!-- #item-meta -->
    <?php endif; ?>

    <?php bp_nouveau_member_header_buttons( array( 'container_classes' => array( 'member-header-actions' ) ) ); ?>
    </div><!-- #item-header-content -->

    cover-image-header.php would display the buttons above the #item-meta

    <?php
    /**
    * BuddyPress - Users Cover Image Header
    *
    * @since 3.0.0
    * @version 3.0.0
    */
    ?>

    <div id="cover-image-container">
    <div id="header-cover-image"></div>

    <div id="item-header-cover-image">
    <div id="item-header-avatar">
    ">

    <?php bp_displayed_user_avatar( 'type=full' ); ?>


    </div><!-- #item-header-avatar -->

    <div id="item-header-content">

    <?php if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) : ?>
    <h2 class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></h2>
    <?php endif; ?>

    <?php
    bp_nouveau_member_header_buttons(
    array(
    'container' => 'ul',
    'button_element' => 'button',
    'container_classes' => array( 'member-header-actions' ),
    )
    );
    ?>

    <?php bp_nouveau_member_hook( 'before', 'header_meta' ); ?>

    <?php if ( bp_nouveau_member_has_meta() ) : ?>
    <div class="item-meta">

    <?php bp_nouveau_member_meta(); ?>

    </div><!-- #item-meta -->
    <?php endif; ?>

    </div><!-- #item-header-content -->

    </div><!-- #item-header-cover-image -->
    </div><!-- #cover-image-container -->


    clicken
    Participant

    @clicken

    I get it now! When I view the clicken user as admin then the buttons are there. I thought those buttons were for the account user to use.

    I apologize, and thank you so very much!


    Prashant Singh
    Participant

    @prashantvatsh

    Welcome 🙂 Glad to know that you got it 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar