This topic has 23 replies, 3 voices, and was last updated 6 years by Radu.

  • Author
  • #195434
     TheDream18
    Participant

    Hi,

    I added bellow code to appear profile url in logged in user profile. But it won’t work. please help me correct it.

    COPY CODE
    if ( bp_is_active( 'profile' ) ) {
    
    $profile_menu['profile'] = '<li><a href="' . bp_loggedin_user_domain() . 'profile/">' . __( "Profile", "buddypress" ) . '</a></li>';
    
    }

    P/S: I already added all another to menu with similar code success. Only /profile isn’t work.

     

    Thanks

    #195466
     TheDream18
    Participant

    The same with rtmedia URl, also no work, please help

    COPY CODE
    if ( bp_is_active( 'media' ) ) {
    									$profile_menu['media'] = '<li><a href="' . bp_loggedin_user_domain() . 'media/">' . __( "Pics", "buddypress" ) . '</a></li>';
    								}
    #195508
     TheDream18
    Participant

    Hi.
    I changed “profile” — to –“xprofile” == worked

    But for media link, i tried “media”, or “rtmedia” == both No work. What should be correct?
    bp_is_active( ‘media’ )
    bp_is_active( ‘rtmedia’ )

    #195552
     Kieran_SQ
    Moderator

    Hi,

    I am not sure what it is you’re trying to achieve, can you let me know what it is you’re trying to do so I can assist you.

    Thanks,

    Kieran

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

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

    #195590
     TheDream18
    Participant

    By defaul header menu haven’t “media”, i would like to add it to header menu

    COPY CODE
    if ( bp_is_active( 'media' ) ) {
    $profile_menu['media'] = '<li><a href="' . bp_loggedin_user_domain() 
    . 'media/">' . __( "Pictrure", "buddypress" ) . '</a></li>';
    }

    No work. What should i do to correct it?

    #195597
     Kieran_SQ
    Moderator

    Hi,

    It is still not clear what it is you’re trying to achieve. When rtMedia is installed a menu item is created automatically on the profile (see screenshot).

    What other action is it you’re trying to do? And where are getting this code from?

    Thanks,

    Kieran

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

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

    Attachments:
    You must be logged in to view attached files.
    #195648
     TheDream18
    Participant

    i add extra code to general-header.php of sweet theme. which allow me extra some menu in $profile-menu. i’m trying to add domain.com/members/username/media, but the code i given was exacly what u did for similar url, why no work?

    #195649
     Kieran_SQ
    Moderator

    Hi,

    I see now, my apologies for the confusion. I will refer this ticket to one of our developers for review. They’ll be in touch with you as soon as they can, Monday to Friday, East European Time.

    Thanks,

    Kieran

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

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

    #195795
     Radu
    Moderator

    Hi,
    The media tab appears under member profile menu when you activate the rtmedia plugin.

    So what you want to acheive ?

    You can follow this one to inspire from here : https://buddydev.com/buddypress/add-extra-links-to-buddypress-user-profile-menu-buddypress-group-menu/

    Cheers
    R

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

    It don’t appear. Seem you are saying about #nav buddypress.

    No, i’m saying about theme/…general-header.php, where is $profile-menu (dropdown menu in header) –> There is only have
    + Activity
    + Friends request
    + Message
    + Friends
    + Setting (—> i added success)
    + Media (–> similar this is what i try to add, but no work. something wrong)

    Dont have rtmedia permarlink there. I added to general-header.php extra code for $profile-menu, but no work, what is wrong? I already make similar to add /setting permalink, which is worked. Only rtmedia don’t work here

    COPY CODE
    
    if ( bp_is_active( 'media' ) ) {
    $profile_menu['media'] = '<li><a href="' . bp_loggedin_user_domain() 
    . 'media/">' . __( "Pictrure", "buddypress" ) . '</a></li>';
    }
    
    
    #195804
     TheDream18
    Participant

    For easier udnerstand, please take a look at screenshot. I want extra media in dropdown menu

    Attachments:
    You must be logged in to view attached files.
    #195817
     Radu
    Moderator

    I see…

    Just add this code to your functions.php

    COPY CODE
    
    
    /* Check if the rtmedia plugin it's activated then hook */
    if ( class_exists( 'RTMedia' ) ) {
        add_filter('header_profile_dropdown', 'my_profile_link', 1);
    }
    function my_profile_link($links) {
        $links[] = '<li><a href="' . bp_loggedin_user_domain().'media/" rel="nofollow">Media</a></li>';
        return $links;
    }
    
    

    Cheers
    R

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

    Hi. The code you given work. But it always stay in BOTTOM position of $profile_menu header in general-header.php.

    Example:

    <?php if ( function_exists( ‘bp_is_active’ ) ): ?>
    <?php $profile_menu1 = array();
    Your code just given here….
    Your defaul code here.

    ==> The logic “slug /media” should appear in TOP, but it always in BOTTOM position. I tried add at middle position, /media also stay in BOTTOM

    Can you check the code?

    #195912
     Radu
    Moderator

    Hi,

    Just copy this file wp-content/themes/sweetdate/page-parts/general-header.php to child theme wp-content/themes/sweetdate-child/page-parts/general-header.php

    Then do the next
    Check the screenshot

    Cheers
    R

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

    Hi.

    Please check the screenshot. Finaly in frontend, i get lost /media slug.

    I would like your code given will allow me put anywhere within the screenshot code, which mean i can REORDER any postion just similar your dafaul /setting slug

    Attachments:
    You must be logged in to view attached files.
    #196046
     Radu
    Moderator

    Hi,

    It’s on top now right ? cuz on my install it’s on top.

    What you need to achieve right now, not understand exactly from your latest reply.

    Cheers
    R

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

    No.

    1)
    1/setting,
    2/notifcation,
    3/message
    4/media (code you given)

    Step 1: I try to reorder code within $profile_menu
    1/notifcation, –> succcess postion 1 in frontend
    2/message –> succcess postion 2 in frontend
    3/media (code you given). Always in bottom even i moved them to postion 3.
    4/setting –> succcess postion 3 in frontend, because /media always down to postion 4 (bottom).

    Step 2) When move the code as you guide. I complete lost /media slug in dropdown menu.
    Step 3) Redo step 2, move code back to bottom postion. /media come back. But still stay in bottom position

    So how do i reorder /media anywhere within $profile_menu as step 1?

    #196284
     Radu
    Moderator

    Hi,

    Not sure, can you please provide the ftp + wp admin to that site ?

    Make sure to edit in child theme cuz it will override the parent theme… (related to this : https://archived.seventhqueen.com/forums/topic/profile-menu-isnt-work/#post-195912 )

    If you had copied the file, make sure to have child hteme activated and to edit in the child not in parent.

    If still not works i waiting the credentials to see live.

    Cheers
    R

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

    Hi.

    Please loggin my website and work direct on main theme, no need setting child-theme. i will know what to do after u tell me what is wrong. This is test web, u are free to broke it.

    http://www.electricshop.bid/wp-admin/theme-editor.php?file=page-parts%2Fgeneral-header.php&theme=sweetdate

    line 126 moved as you request make lost /rtmedia in frontend

    line 144-152 is the code /rtmedia slug (now it lost because move code on line 126)

    Please help me check

    #196452
     TheDream18
    Participant

    Hi how is the issue going on? It have been 2 days did not hear from u.

    #196453
     TheDream18
    Participant
    This reply has been set as private.
    #196594
     Radu
    Moderator

    Hi,

    There was a misunderstanding.

    those should be added in the functions.php : https://archived.seventhqueen.com/forums/topic/profile-menu-isnt-work/#post-195817 said here, then to can control the position of the media button following : https://archived.seventhqueen.com/forums/topic/profile-menu-isnt-work/#post-195912

    I’ve do that for you and how they are ok, the exception it’s you will have to copy this file : wp-content/themes/sweetdate/page-parts/general-header.php to child theme wp-content/themes/sweetdate-child/page-parts/general-header.php

    I’ve modified in parent at this moment, so just copy the file as how i said from the beginning.

    Then paste this code in the child theme ( wp-content/thems/sweetdate-child/functions.php )

    COPY CODE
    
    /* Check if the rtmedia plugin it's activated then hook */
    if ( class_exists( 'RTMedia' ) ) {
        add_filter('header_profile_dropdown', 'my_profile_link', 1);
    }
    function my_profile_link($links) {
        $links[] = '<li><a href="' . bp_loggedin_user_domain().'media/" rel="nofollow">Media</a></li>';
        return $links;
    }
    

    CHILD THEME NEEDS TO BE INSTALLED AND ACTIVATED.

    Cheers
    R

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

    Hi i don’t misunderdtand. I did the same before. But as you see the result are same.

    /media always stay in BOTTOM

    now how do make /media appear before /setting in $profile-menu?

    MY demo web appear:
    /setting
    /media

    I want:
    /media
    /setting

    #196785
     Radu
    Moderator

    I see to can have media first you should follow what i said there! https://archived.seventhqueen.com/forums/topic/profile-menu-isnt-work/#post-196594

    Also the child theme missing and for this kind of modification it’s necessary to have it!

    i’ve change that again for you secondly i hope you will not say the same thing…

    So i’ve provided you the steps and also i’ve done that for you two times. Nor sure why you had deleted or reversed the change.

    I think i can close the ticked all info provided and you had achieved what you need.

    Again: Install child theme and follow this https://archived.seventhqueen.com/forums/topic/profile-menu-isnt-work/#post-196594
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 24 posts - 1 through 24 (of 24 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?