This topic has 13 replies, 4 voices, and was last updated 9 years by Abe.

  • Author
  • #28941
     gregmc
    Participant

    Hi Steve

    Cannot get any BP Xprofile Tabs to display in a users profile…. have added following code to functions.php in child theme, but still wont show

    COPY CODE
    add_action('after_setup_theme','kleo_my_custom_tabs');
    function kleo_my_custom_tabs()
    {
        global $bp_tabs;
        $bp_tabs[] = array(
                'type' => 'regular',
                'name' => "My Stats",
                'group' => 'Gameestats',
                'class' => 'regulartab'
        );
    }
    Attachments:
    You must be logged in to view attached files.
    #29556
     Catalin
    Moderator

    please take a look here:

    https://archived.seventhqueen.com/forums/topic/adding-extra-tabs-_-stuck-sos

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #29620
     gregmc
    Participant

    hey Catalin – still no luck for me – see attached pic – under profile link the extra profile groups appear (see bottom of the pic) but it will not show next to the avatar – trying to get gamestats to show there

    this is what i have in function.php (child theme)

    COPY CODE
    add_action('after_setup_theme','kleo_my_custom_tabs');
    function kleo_my_custom_tabs()
    {
        global $bp_tabs;
        $bp_tabs = array();
     
     
        $bp_tabs['base'] = array(
                'type' => 'regular',
                'name' => "About",
                'group' => 'Base',
                'class' => 'regulartab'
        );
     
        /* rtMedia tab - only if plugin installed */
        if (class_exists('RTMedia'))
        {
            $bp_tabs['rtmedia'] = array(
                    'type' => 'rt_media',
                    'name' => __('My photos', 'kleo_framework'),
                    'class' => 'mySlider'
            );
        }
     
        /* Bp-Album tab - only if plugin installed */
        elseif (function_exists('bpa_init')) {
            $bp_tabs['bp-album'] = array(
                    'type' => 'bp_album',
                    'name' => __('My photos', 'kleo_framework'),
                    'class' => 'mySlider'
            );
        }
    	
    	$bp_tabs['Gamestats'] = array(
    'type' => 'regular',
    'name' => __('Gamestats', 'kleo_framework'),
    'group' => 'Gamestats',
    'class' => 'regulartab'
    );
     
    }
    Attachments:
    You must be logged in to view attached files.
    #29718
     Catalin
    Moderator

    please send me admin credential to your website to take a look and fix your issue… reply as private for security reasons.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #29765
     gregmc
    Participant
    This reply has been set as private.
    #29812
     Abe
    Keymaster

    @gregmc your site is not available

    This should be fairly simple. Following this topic you should make changes in those arrays and change the “group” and “name” with your group names as in Users – Profile fields

    https://archived.seventhqueen.com/forums/topic/how-to-add-more-tabs-next-to-the-profile-image

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #29815
     gregmc
    Participant
    This reply has been set as private.
    #30122
     Abe
    Keymaster

    What have you added in your child theme so I can check if you added the correct code and what are your Group named you want to show there?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #30150
     gregmc
    Participant

    @abe – tx for replying – as a test have put exact same in main theme functions as well but had no effect… what worries me is that even the base tab does not show… there is data in the xprofile fields, which means it should show (see image 3)

    COPY CODE
    
    add_action('after_setup_theme','kleo_my_custom_tabs');
    function kleo_my_custom_tabs()
    {
        global $bp_tabs;
        $bp_tabs = array();
     
     
        $bp_tabs['base'] = array(
                'type' => 'regular',
                'name' => "About me",
                'group' => 'Base',
                'class' => 'regulartab'
        );
    	
    		$bp_tabs['Gamestats'] = array(
    				'type' => 'regular',
    				'name' => __('Gamestats', 'kleo_framework'),
    				'group' => 'Gamestats',
    				'class' => 'regulartab'
    	);
    	
    			$bp_tabs['Games Played'] = array(
    				'type' => 'regular',
    				'name' => __('Games Played', 'kleo_framework'),
    				'group' => 'Preferences',
    				'class' => 'regulartab'
    	);
    Attachments:
    You must be logged in to view attached files.
    #30154
     gregmc
    Participant

    missed some

    COPY CODE
    
    add_action('after_setup_theme','kleo_my_custom_tabs');
    function kleo_my_custom_tabs()
    {
        global $bp_tabs;
        $bp_tabs = array();
     
     
        $bp_tabs['base'] = array(
                'type' => 'regular',
                'name' => "About me",
                'group' => 'Base',
                'class' => 'regulartab'
        );
    	
    		$bp_tabs['Gamestats'] = array(
    				'type' => 'regular',
    				'name' => __('Gamestats', 'kleo_framework'),
    				'group' => 'Gamestats',
    				'class' => 'regulartab'
    	);
    	
    			$bp_tabs['Games Played'] = array(
    				'type' => 'regular',
    				'name' => __('Games Played', 'kleo_framework'),
    				'group' => 'Preferences',
    				'class' => 'regulartab'
    	);
     
        /* rtMedia tab - only if plugin installed */
        if (class_exists('RTMedia'))
        {
            $bp_tabs['rtmedia'] = array(
                    'type' => 'rt_media',
                    'name' => __('My photos', 'kleo_framework'),
                    'class' => 'mySlider'
            );
        }
     
        /* Bp-Album tab - only if plugin installed */
        elseif (function_exists('bpa_init')) {
            $bp_tabs['bp-album'] = array(
                    'type' => 'bp_album',
                    'name' => __('My photos', 'kleo_framework'),
                    'class' => 'mySlider'
            );
        }
    	
    
    #30426
     Abe
    Keymaster

    @gregmc is your child theme active? Then code looks good

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #46311
     Neptin
    Participant

    My tabs are missing to.. how do i fix this?

    #46313
     Neptin
    Participant

    Looks like only Album, Media, Settingsare showing

    #47284
     Abe
    Keymaster

    Since version 2.8 you can do it from WP admin – Sweetdate

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 14 posts - 1 through 14 (of 14 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?