The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
How to change the l...
 
Share:
Notifications
Clear all

[Solved] How to change the login link class??

8 Posts
2 Users
0 Reactions
1,984 Views
Posts: 23
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@civilenggnotes)
Eminent Member
Joined: 6 years ago
[#1551]

Hello,

I am using a pop up login plugin where i need to add class in link to trigger the pop up, like <a href="#Login" class="lrm-login lrm-hide-if-logged-in" > Login </a> to trigger pop up login when clicked on login text.

Now, in the User Authorization and Profile Data option in the setting i could found the login url, but don't know how to do that.

Please guide me regarding this..


7 Replies
Asti
Posts: 8210
 Asti
Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@asti)
Illustrious Member
Joined: 8 years ago

Hi @civilenggnotes,

You should find all classes that are added on the popup window in the plugin and put it in the class attributes (the red marked codes are just an example, in your case, it may differ) in the code below: 

add_filter("wpdiscuz_login_link", function ($login) {
return str_replace(" href=", " class='swal-menu-item sw-open-login' href=", $login);
});

Put the code in the WordPress active theme functions.php file (more information how to add insert custom code):


Reply
6 Replies
(@civilenggnotes)
Joined: 6 years ago

Eminent Member
Posts: 23
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@asti

Sorry.. i couldn't understand where to find and replace code.


Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8210
Asti
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@civilenggnotes,

Put the code in the WordPress active theme functions.php file. More information on how to add insert custom code you can find here: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/


Reply
(@civilenggnotes)
Joined: 6 years ago

Eminent Member
Posts: 23
Asti
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@asti

Thanks a lot.. I will try this and let you know if i face any other problems or it works..


Reply
(@civilenggnotes)
Joined: 6 years ago

Eminent Member
Posts: 23
Asti
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

hi @asti

i just added the code you provided, and make the necessary changes. but the problem I am facing now is that when I am clicking on the login link, it is getting refreshed with URL like example.com/test-post/?redirect_to=example.com/test-post and then again I need to click the login link. 

Please have a look at https://www.civilenggnotes.in/differences-between-tmt-bars-hysd-bars/


Reply
(@civilenggnotes)
Joined: 6 years ago

Eminent Member
Posts: 23
Asti
Asti
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

i add these lines in theme's function.php file.

add_filter("wpdiscuz_login_link", function ($login) {
return str_replace(" href=", " class='lrm-login lrm-hide-if-logged-in' href=", $login);
});


Reply
(@civilenggnotes)
Joined: 6 years ago

Eminent Member
Posts: 23
Asti
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@asti

I guess it was some cache problem, which is now solved I guess.


Reply
Share: