-
Author
-
April 20, 2018 at 12:17 #195434TheDream18Participant
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 CODEif ( 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
April 20, 2018 at 18:16 #195466TheDream18ParticipantThe same with rtmedia URl, also no work, please help
COPY CODEif ( bp_is_active( 'media' ) ) { $profile_menu['media'] = '<li><a href="' . bp_loggedin_user_domain() . 'media/">' . __( "Pics", "buddypress" ) . '</a></li>'; }
April 21, 2018 at 03:26 #195508TheDream18ParticipantHi.
I changed “profile” — to –“xprofile” == workedBut for media link, i tried “media”, or “rtmedia” == both No work. What should be correct?
bp_is_active( ‘media’ )
bp_is_active( ‘rtmedia’ )April 21, 2018 at 17:17 #195552Kieran_SQModeratorHi,
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 solutionIf 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.
April 21, 2018 at 18:52 #195590TheDream18ParticipantBy defaul header menu haven’t “media”, i would like to add it to header menu
COPY CODEif ( 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?
April 21, 2018 at 19:06 #195597Kieran_SQModeratorHi,
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 solutionIf 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.April 22, 2018 at 04:39 #195648TheDream18Participanti 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?
April 22, 2018 at 04:52 #195649Kieran_SQModeratorHi,
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 solutionIf 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.
April 23, 2018 at 16:26 #195795RaduModeratorHi,
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
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 23, 2018 at 17:15 #195800TheDream18ParticipantIt 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 CODEif ( bp_is_active( 'media' ) ) { $profile_menu['media'] = '<li><a href="' . bp_loggedin_user_domain() . 'media/">' . __( "Pictrure", "buddypress" ) . '</a></li>'; }
April 23, 2018 at 17:21 #195804TheDream18ParticipantFor 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.April 23, 2018 at 18:35 #195817RaduModeratorI 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
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 24, 2018 at 12:12 #195890TheDream18ParticipantHi. 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?
April 24, 2018 at 18:17 #195912RaduModeratorHi,
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 screenshotCheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 25, 2018 at 06:36 #195975TheDream18ParticipantHi.
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.April 25, 2018 at 19:13 #196046RaduModeratorHi,
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
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 27, 2018 at 08:09 #196213TheDream18ParticipantNo.
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 positionSo how do i reorder /media anywhere within $profile_menu as step 1?
April 27, 2018 at 16:58 #196284RaduModeratorHi,
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
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 27, 2018 at 20:35 #196318TheDream18ParticipantHi.
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.
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
April 30, 2018 at 14:03 #196452TheDream18ParticipantHi how is the issue going on? It have been 2 days did not hear from u.
May 2, 2018 at 17:35 #196594RaduModeratorHi,
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
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMay 3, 2018 at 21:37 #196745TheDream18ParticipantHi 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
/mediaI want:
/media
/settingMay 4, 2018 at 12:45 #196785RaduModeratorI 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
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.