My thread was closed

here is the info cut and pasted from the last support thread (below the astricks)
you are telling me to delete JS that was given to me by support for a different issue.
this issue is not the plugin(s)

The logged in and logged out difference is related to the CSS. I was provided 2 different css groups to add for each one.


Hi there,

The logged in logged out difference is not related to the CSS at all. It shows that there is a problem on your installation specially when it comes to the cache.

Please clear and purge all the cache plugins and deactivate them. Then contatc your hosting service provider and ask them to clear cache if they have any.

Besides the point in question please consider that there are two Javascript errors on the page that you need to fix.

The BP Create Group Type plugin is causing the error below:

You added a Javascript code to X > Theme Options > JS which cause the Uncaught SyntaxError: Unexpected token > error. Please remove that code:

Kindly open up new threads for additional questions as it will help us to focus on each issue and give you a better support which you deserve. Having a long threads makes the maintaining job harder and also it will be harder for the other customers to find the correct information if they have similar issues. You are always welcomed to reply to this thread to follow up the same question.

Thank you.

Hello There,

Thanks for writing in!

Please keep in mind that a thread that is older than 10 days will be automatically closed after the last reply.

Anyway, I have checked your site and I can see a JS error. Taking a closer look shows that the JS error is caused by an invalid JS code. You have inserted a PHP code in the custom JS section. This is why the error shows up. Please go to your Theme Options custom JS section and completely remove this code:

// add edit profile to wordpress menu
*/

// Filter wp_nav_menu() to add profile link
add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
function my_nav_menu_profile_link($menu) {
    if (!is_user_logged_in())
        return $menu;
    else
        $current_user = wp_get_current_user();
        $user=$current_user->user_nicename ;
        $profilelink = '<li><a href="/forums/users/' . $user . '/edit">Edit Profile</a></li>';
        $menu = $menu . $profilelink;
        return $menu;  
}
/*
// Addubg kigub/logout to menu
*/
add_filter( 'wp_nav_menu_items', 'rkk_add_auth_links', 10 , 2 );
function rkk_add_auth_links( $items, $args ) {
 if ( is_user_logged_in() ) {
 $items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>';
 }
 elseif ( !is_user_logged_in() ) {
 $items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>';
 $items .= '<li><a href="'. site_url('wp-login.php?action=register') .'">Register</a></li>';
 $items .= '<li><a href="'. site_url('wp-login.php?action=lostpassword') .'">Lost Password</a></li>';
 }
 return $items;
}

Please be advised that the PHP code above can only be added in your child theme’s functions.php file. Simply go to Appearance > Editor > “functions.php” file and insert the code. The file editor may not be available in your dashboard if by default you aren’t allowed to edit any files within your WordPress dashboard.

Hope this helps. Please let us know how it goes.

Thanks for the info. Never knew that was there.

You’re welcome! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.