Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Change Login Button Behavior
Avatar
Jerry Hilburn
Rookie
sp_UserOfflineSmall Offline
Aug 9, 2016 - 5:23 pm

I would like the login button to go immediately to the wp-login.php page instead of the dropdown login on Unified Theme.

Please advise.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 9, 2016 - 6:20 pm

i believe this is what you also sent a PM about which I have just answered

andy-signature.png
YELLOW
SWORDFISH
Avatar
Jerry Hilburn
Rookie
sp_UserOfflineSmall Offline
Aug 9, 2016 - 6:27 pm

From your PM: 

No - Unified does not separate desktop from mobile. There is just the spHead.php template in the /templates folder.

Both Desktop and Mobile are dealt with inside the same template using conditional statements so you will need to look for the function twice abd you will see above if it is for $spDevice == 'mobile' or not.

>>>>>>>> Totally confused

Please provide code sample and location in spHead. I am sorry but I don't understand your code reference.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 9, 2016 - 10:14 pm

afraid I am not privvy to all this discussion.. @yellow-swordfish will be back tomorrow and can report back...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 10, 2016 - 3:43 am

Let's put it a different way.

You have the code changes that you want to make (they were in your PM). In the Unified theme you will need to make them twice in the same template. The template is /template/spHead.php. Search for the function to change - just find both occurrences.

By the way,  I am unsure where you got the code from but I assume it was another topic thread. Remember that it is best to create a child theme if you plan to change the SP theme code in any way - to save having it overwritten during a future update. Child themes are quick and easy and you can download the framework from our store (no cost). 

For full details - and it really is easier than it looks - see https://simple-press.com/docum.....ild-theme/

andy-signature.png
YELLOW
SWORDFISH
Avatar
Jerry Hilburn
Rookie
sp_UserOfflineSmall Offline
Aug 10, 2016 - 3:45 pm

Ok I tried it and it does not work. Apparently I am doing something wrong. I only see references for mobile start in my file and cannot identify the correct lines of code to modify. I apologize for not being able to do this on my own, but I need your help. 

Can we clear the slate, forget the PM, forget everything written above, and start over?

I am using the Unified Theme. I have created a child theme. I am ready to modify the spHead.php file.

I believe I need to add this snippet of code somewhere in this file.

&loginLink=http://forums.boyce-astro.org/wp-login

My objective is to redirect all login buttons on the forum page to open this page in my website:

http://forums.boyce-astro.org/wp-login

Which lines of code do I modify in the spHead.php file to achieve this goal.

Can you identify the line number and provide a before / after code snippet showing the line of code prior to modification, and after modification.

I have attached a copy of the spHead.php file as spHead.txt for reference purposes.

Please advise.

Thank you.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 10, 2016 - 4:58 pm

Let's do it one at a time starting with desktop version. And just in case you do not know you MUST use a plain text editor for the editing. NOT a Word Processing package.

Open the spHead.php file in the /templates folder of your child Unified theme. Find Line 182 that looks like this:

sp_LogInOutButton('tagClass=spButton spRight', __sp('Log In'), __sp('Log Out'), __sp('Log in and log out'));

and change it to be:

sp_LogInOutButton('tagClass=spButton spRight&logInLink=http://forums.boyce-astro.org/wp-login.php', __sp('Log In'), __sp('Log Out'), __sp('Log in and log out'));

(There were two errors in the code you pasted above. One was capitalisation of the 'I' in 'logInLink' and the other was the lack of '.php' on the end of the login page url).

Now find line 200 that looks like this:

sp_LoginForm($loginForm);

and comment it out. In other words place a # character in front of the line:

#sp_LoginForm($loginForm);

and that should be is - assuming your domain IS 'http://forums.boyce-astro.org'.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Jerry Hilburn
Rookie
sp_UserOfflineSmall Offline
Aug 12, 2016 - 9:08 pm

Worked perfectly. Thank you.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 12, 2016 - 9:32 pm

good deal!  thanks for the update...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 618
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10126
Posts: 79622