Notifications
Clear all

[Solved] login link

2 Posts
2 Users
0 Reactions
1,422 Views
(@electrochick)
New Member
Joined: 7 years ago
Posts: 3
Topic starter  

Hi,

Am really enjoying the plugin, thank's for that.

My theme uses a login with ajax modal pop up for user login/logout/registration

I have set up users to be logged before being able to comment in my test site. The link works but does not open the pop up

I have looked up in the form.php of the plugin and guess that"s where I could change / add something for the pop up to open.

Could you give me on a tip on how I could achieve that ?

Thank's

 


   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6149
 

Hi Electrochick,

I suggest you use the following code, put it in current active functions.php file, and you can make changes as like as you want: 

add_filter('loginout', 'myLoginLink');

if (!function_exists('myLoginLink')) {
   function myLoginLink($link) {
       if (preg_match('#<a[\r\n\t\s]*href=["\']([^"\']+)["\'][^<>]*>#isu', $link, $matches)) {
           $url = $matches[1] . '#mypopuplink';
           $link = '<a style="color:#000;font-size:16px;font-weight:700;" href="' . $url . '">';
           $link .= 'Login';
           $link .= '</a>';
       }
       return $link;
   }
}

 

 


   
ReplyQuote
Share:
Scroll to top