Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

adding login/logout to menu bar


  #1  
Old Jan 12, 2011, 11:05 AM
Pshill
 
5 posts · Nov 2010
Hi,

there was a thread in march 2009 on adding login/logout to the menu bar . I cannot find the correct location to add this to bfa_header_config.php in the current iteration as of 1/10/11. Can you help? Thanks
  #2  
Old Jan 12, 2011, 12:06 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
1) what was the thread and
2) what is your 'the current iteration as of 1/10/11' ?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Jan 12, 2011, 12:26 PM
Pshill
 
5 posts · Nov 2010
this was the thread
http://forum.bytesforall.com/showthr...add+login+menu

atahualpa 3.6

looking to add login to menu bar
  #4  
Old Jan 12, 2011, 01:11 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
in 3.6.1 edit bfa_header_config.php and change lines 65-69 from
HTML Code:
			// Close table if centered
			if ( strpos($header_items,"%page-center") !== FALSE ) 
				echo '</ul></td></tr></table></div>' . "\n";
			else 
				echo '</ul></div>' . "\n";
to
HTML Code:
			// Close table if centered
			if ( strpos($header_items,"%page-center") !== FALSE )  {
				echo  "\n<li>";
				echo  wp_loginout();
				echo  '</li></ul></td></tr></table></div>' . "\n";
			} else {
				echo "\n<li>";
				echo wp_loginout();
				echo '</li></ul></div>' . "\n";
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Jan 12, 2011, 03:07 PM
Pshill
 
5 posts · Nov 2010
tried the suggestion and end up with a parse error

Parse error: syntax error, unexpected T_ELSE in /home/artiq99/public_html/optionspowerhouse.com/wp-content/themes/atahualpa/functions/bfa_header_config.php on line 140

any ideas thanks
  #6  
Old Mar 30, 2011, 06:29 PM
SupraTT's Avatar
SupraTT
 
78 posts · May 2009
Hi Pshill,

Did you get this to work? There was a missing "}" for the last else statement. That could be the issue.

SupraTT
__________________
---
>> Los Angeles Search Engine Marketing - Web Development & Marketing
  #7  
Old Mar 31, 2011, 03:32 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Pshill - sorry, this dropped off the rada

It was missing a closing '}' - use this instead, I also added the class so it will get styled
In 3.6.4 replace lines 65-69
HTML Code:
			// Close table if centered
			if ( strpos($header_items,"%page-center") !== FALSE ) 
				echo '</ul></td></tr></table></div>' . "\n";
			else 
				echo '</ul></div>' . "\n";
with
HTML Code:
	// Close table if centered
			if ( strpos($header_items,"%page-center") !== FALSE )  {
				echo  '<li class="page_item">';
				echo  wp_loginout();
				echo  '</li></ul></td></tr></table></div>' . "\n";
			} else {
				echo '<li class="page_item">';
				echo wp_loginout();
				echo '</li></ul></div>' . "\n";
			}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #8  
Old Nov 18, 2011, 06:48 PM
WebHGI
 
2 posts · Nov 2011
Hi there!
I have followed from the previous thread mentioned by the OP, to this one and have copied the code snippet that juggledad provided and pasted it into the bfa_header_config.php as instructed, but there is no log in/out link appearing in my menu? Very confused here..
I am using WP 3.2.1 and Atahualpa 3.6.7. Please help!

I am simply trying to add a 'log out' button to the main menu. There doesn't need to be a 'log in' button there because the site is using Absolute Privacy to lockdown the site to visits without logging in. Log out should redirect back to the 'log in' page then.

Basically if a visitor logs in via the 'log in' page it directs to the home, and other than showing the admin bar at the top (which i do not want the public to see), there is no log out button anywhere. I also tried the log in & log out plugin, but it didn't work. So, I'm wanting to just code a logout button as the last (far right) button on the main menu at the top of the page.
  #9  
Old Nov 19, 2011, 04:13 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
That code will only work if you are using the Atahualpa menu. If you are using a WordPress custom menu, it won't work.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #10  
Old Nov 21, 2011, 01:09 PM
WebHGI
 
2 posts · Nov 2011
thanks for the reply.

I think i am using the atahualpa main menu?
hmmmm...

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding login/logout menu option. soop Atahualpa 3 Wordpress theme 12 Sep 12, 2011 01:01 PM
[SOLVED] Adding Categories to Menu Bar GreenEcoChick Page & Category Menu Bars 4 Oct 15, 2010 08:00 PM
Automatically adding new pages to page menu bar oskarfalk Page & Category Menu Bars 1 Sep 11, 2010 09:00 AM
Adding a category to my top menu bar glennvogelsang Page & Category Menu Bars 4 Jul 7, 2010 09:31 AM
Adding an image to b/g of menu bar nickcee Page & Category Menu Bars 12 Apr 27, 2009 07:52 PM


All times are GMT -6. The time now is 08:15 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.