This topic has 8 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #197472
     TheDream18
    Participant

    Hi,

    i want to add “domain.com/all-activity”  to header menu. i used bellow code. but don’t work

    if ( bp_is_active( ‘activity’ ) ) {

    $profile_setting[‘activity’] = ‘

    <li><a href=”‘

    . ‘all-activity/”>’ . __( “all Activity”, “buddypress” )

    . ‘</a></li>

    ‘;

    }

    problem it always kind of:

    domain.com/ current-open-page /all-activity

     

    how do i correct the code?  for complete display only  domain.com/all-activity

     

    thanks

    #197491
     Kieran_SQ
    Moderator

    Hi,

    I am not sure why you have PHP for a static link, is there more to the requirements than stated above?

    If not you can simply use HTML like so

    <li><a href="/all-activity/">All Activity</a>

    Thanks,

    Kieran

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

    Hi,

    I have link domain.com/all-activity from
    ==>buddypress setting/page/choose activity page / i create and choosed “all-activity”

    By defaul sweettheme only add domain.com/username/activity (personal page)

    Now i want to add url domain.com/all-activity to Top of $profile-menu, what code should i add

    thanks

    #197553
     Kieran_SQ
    Moderator

    Hi,

    In that case you need to apply the HTML I provided above in the same location where you made your other changes to this menu.

    From line 126 onward of the general-header.php file in your SweetDate Child theme

    COPY CODE
    if ( bp_is_active( 'activity' ) ) {
    	echo '<li><a href="/all-activity/">All Activity</a>';
    }

    Add the above code in the position you wish it to appear in the menu.

    Thanks,

    Kieran

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

    It worked. similar i want to move logout button to bottom of $profile-menu, what code should i add here. i tried both code as attachment, but work none correct, can u help me the correct code

    #197579
     Kieran_SQ
    Moderator

    Hi,

    Please paste the code you’re trying to use here, using the code tags from the reply area (important), so I can correct the errors.

    Kieran

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

    Here is the code i current use (marked red in screenshot of last respond)

    COPY CODE
    if ( bp_is_active( 'logout' ) ) {
    	$profile_menu1['logout'] = 
    	'<li> 
    	 <a href=" ' . wp_logout_url( get_bloginfo( 'url' ) ).' ">
    	 '. __( "Logout", "buddypress" ) .'
        </a>
        </li>';
    }

    What is problem, when user logout they used can’t success logout
    1) sometime lucky success logout 100%
    2) sometime success logout by fake, when user try to logout got error message: “you seem already logged in, please refsh the page” for multiple and many way to refesh user still same situation

    NOTE: When i hover on logout, right conner of screenshot i found. example i logout when i’m openning page: page1
    domain.com/page1/?_bl_wpnonce=432ea194cf&redirect_to=https://domain.com:443/page1

    SO in case i’m standing on search page: blabla….so so long slug
    my logout slug will supper long like bellow, what a crazy, can be issue with security due to call action for too too long slug.
    domain.com/blabla….so so long slug/?_bl_wpnonce=432ea194cf&redirect_to=https://domain.com:443/blabla….so so long slug

    Finaly
    what is correct code for me for simple logout without appear /page1 (in example)
    ===>redirect_to=https://domain.com:443/…….behide nothing here

    And i wonder where is :443 come from?

    #197591
     Kieran_SQ
    Moderator

    Hi,

    I will refer this ticket to one of developers so that they can provide you with the correct PHP to generate the logout URL you require.

    There are no security concerns with the current method as it is done in the WordPress way. Where a URL, domain or path has a suffix of :number it refers to a port number for communication and is generated at the server level – this is not something to be concerned about.

    One of our developers will be in touch with you as soon as they can, Monday to Friday, East European Time.

    Thank you for your patience,

    Kieran

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

    443 it’s the port for the https connection, not sure from where it comes, did you get same logout url with default theme ? anyway the hostname it’s get from the server so our theme not generates that.

    If you have any wp plugin “force ssl” or similar, deactivate it, also if you have browser extension like “https everywhere” set off and retry.

    Cheers
    R

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

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?