Please or Register to create posts and topics.

Universal Link to Asgaros Profile Page

I'm trying to customize things toward a mobile view since half of our users appear to be using their phones to view our site.

Is there a way to get a URL of the profile link within the Asgaros Menu and put that link in a Site Menu?

I want the Profile in the green forum menu to be placed in the site menu at the top.

Hey @hawks-cast,

you can use the following code to change a menu entry:

add_filter( 'nav_menu_link_attributes', 'asgaros_menu_profile', 10, 3 );

function asgaros_menu_profile( $atts, $item, $args ) {
    if (!strpos($atts['href'], '--asgaros-profile--')) {
        return $atts;
    }

    $user = wp_get_current_user();
    $profile_link = home_url() . "/forum/profile/" . $user->user_nicename;
    $atts['href'] = $profile_link;

    return $atts;
}

After adding this code you only have to add "--asgaros-profile--" to the URL of the menu entry and it will be replaced with the profile link.

Hawks Cast has reacted to this post.
Hawks Cast
If you ever wonder how to return the favour for helping you.

This website called signnow.com/ask/everything-you-need-to-know-about-how-to-create-a-signable-pdf-right-from-your-smartphone-or-tablet performed a fantastic job overall. I had no clue they would put on such a spectacular display. You are highly recommended

Actually I have seen many people ignorng the content on airslate.com/bots/gmail even though it is the best. They don’t read and assume it isnt good. They shouls atleast give it a try.

Great tips and very easy to understand. This will definitely be very useful for me when I get a chance to start my blog. Vipslot

Its a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work. Check Logic

Very good points you wrote here..Great stuff...I think you've made some truly interesting points.Keep up the good work. stair lifts

I found Hubwit as a transparent s ite, a social hub which is a conglomerate of Buyers and Sellers who are ready to offer online digital consultancy at decent cost. eyelash extension cromer

This is just the information I am finding everywhere. Thanks for your blog, I just subscribe your blog. This is a nice blog.. empresas de seguridad privada en cancun