Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Adding login/logout menu option.

Old Feb 7, 2009, 01:04 PM
2 posts · Feb 2009
Hi and thanks for the excellent theme & support.

I have previously used the wordpress wp_loginout() function in other themes to show a link in a menu to the login/logout page.

I have successfully manged to get additional menus on the page menu (using http://forum.bytesforall.com/showthr...p?t=103&page=2) but I dont seem to be able to get this working.

If I add
PHP Code:
$page_menu_bar .= '<li>' wp_loginout '</li>' "\n"
to my bfa_header_config.php file I get the function echoing the output instead of inserting it in between the <li> tags. This means teh login/out link shows above the menu without formatting. Like so:

Can you offer any help please?
Old Feb 7, 2009, 02:05 PM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
You can capture the output

PHP Code:
ob_start(); wp_loginout(); $loginlink ob_get_contents(); ob_end_clean();
$page_menu_bar .= '<li>' $loginlink '</li>' "\n"
or see bfa_footer.php on how to get non-printing links for login logout, site admin etc...

However the capture method is better and I will rewrite the theme to use that technique as it allows plugins to hook into these higher level printing functions that can be used with this technique, while they cannot hook into the lower level non-printing functions as used in bfa_footer.php, bfa_postinfo.php etc...
So, maybe slightly less flexible but more plugin-safe and easier to maintain and less/easier code.
Old Feb 7, 2009, 06:04 PM
2 posts · Feb 2009
Thank you very much Flynn. That output buffer is a useful tool.

Congratations on such a great theme.
Old Mar 19, 2009, 03:30 AM
3 posts · Mar 2009

I'm sorry I'm feeling dense. I would like to do the same thing. (Add a login/out link) but I can't seem to figure out where to add that line of code.

Could you walk me through it?

Old Mar 19, 2009, 07:53 AM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
Add it in functions/bfa_header_config.php right before

PHP Code:
$page_menu_bar .= '</ul></div>' "\n";
// END of Page Menu Bar 
Old Mar 19, 2009, 09:37 AM
paulae's Avatar
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
This is great! Thanks!
Old Mar 19, 2009, 11:17 AM
3 posts · Mar 2009
Yes, thank you from me as well. Worked like a charm.
Old Mar 21, 2009, 10:08 AM
1 posts · Mar 2009
I am really enjoying your theme and customizing it as well. Great job.
I seem to be having a problem logging out of the site. It doesn't seem to work. Once logged in the user stays logged until another user logs in.
I have downloaded the latest Atahualpa 3 verison from the WordPress site. I was wondering if I needed to change this /atahualpa/ to /atahualpa3/. Maybe this is the problem. If so I have already uploaded the fold /atahualpa/ and have done allot of customizing, if I change the file name to /atahualpa3/ on my server would this effect my sites appearance, links, etc..
Please help
Old Mar 21, 2009, 11:48 AM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
Both /atahualpa/ and /atahualpa3/ should work. You could even run both /atahualpa/ and /atahualpa3/ on the same Wordpress installation side by side. They would have different files (in different drectories) but share the same Atahualpa Option settings in the Wordpress database
Old Jan 10, 2011, 12:18 PM
5 posts · Nov 2010

This thread on adding login/logout to the menu bar from 2009. 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
Old Sep 11, 2011, 09:43 PM
25 posts · Jul 2010
I just would like to add a follow up question, since it's a similar thread.
I have stumbled upon this function:
<?php wp_loginout(); ?>

Which is supposed to create a log in | log out | link when inserted.
The problem I'm facing is that I'd like to use this code within a table that I've inserted into the 'HTML Inserts: Body Top' section of the theme, and that part doesn't support .php

Can you possibly tell me how I can accomplish this?
Old Sep 12, 2011, 06:57 AM
juggledad's Avatar
23,730 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
why not add a new widget area to the 'Configure header area' option and put your table in there. Add a text widget with your table and the sp-login. If you have the exec-php plugin, it should work
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Old Sep 12, 2011, 02:01 PM
25 posts · Jul 2010
This is what I have done. It works really well.
Thank you!


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to customize Login, Registration and Lost Password with wp-customized-lo fromtheranks Plugins & Atahualpa 15 Apr 24, 2012 04:24 PM
Logout link in footer fails in WP2.7 BradBrown Atahualpa 3 Wordpress theme 3 May 24, 2009 05:10 PM
WP-admin logout/in for changes to occur? Craig Mattice Atahualpa 3 Wordpress theme 2 Apr 30, 2009 04:26 PM
Settings Not Saving Until Logout ieatgravel Atahualpa 3 Wordpress theme 3 Apr 14, 2009 06:25 AM
[SOLVED] Very minor : page menu bar home option dcousquer Page & Category Menu Bars 1 Dec 13, 2008 04:52 AM

All times are GMT -6. The time now is 01:21 PM.

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