Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

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

Adding login/logout menu option.


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Feb 7, 2009, 12:04 PM
soop
 
2 posts · Feb 2009
Adding login/logout menu option.

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?
  #2  
Old Feb 7, 2009, 01:05 PM
Flynn's Avatar
Flynn
 
3,754 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.
  #3  
Old Feb 7, 2009, 05:04 PM
soop
 
2 posts · Feb 2009
Thank you very much Flynn. That output buffer is a useful tool.

Congratations on such a great theme.
  #4  
Old Mar 19, 2009, 02:30 AM
jenyum
 
3 posts · Mar 2009
Hi,

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?

Thanks.
  #5  
Old Mar 19, 2009, 06:53 AM
Flynn's Avatar
Flynn
 
3,754 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 
  #6  
Old Mar 19, 2009, 08:37 AM
paulae's Avatar
paulae
 
1,330 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
This is great! Thanks!
  #7  
Old Mar 21, 2009, 09:08 AM
ddcat
 
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
  #8  
Old Mar 21, 2009, 10:48 AM
Flynn's Avatar
Flynn
 
3,754 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
  #9  
Old Jan 10, 2011, 11:18 AM
Pshill
 
5 posts · Nov 2010
Hi,

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
  #10  
Old Sep 11, 2011, 08:43 PM
bvimusic
 
21 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?
  #11  
Old Sep 12, 2011, 05:57 AM
juggledad's Avatar
juggledad
 
21,971 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
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
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support

Bookmarks

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 03:24 PM
Logout link in footer fails in WP2.7 BradBrown Atahualpa 3 Wordpress theme 3 May 24, 2009 04:10 PM
WP-admin logout/in for changes to occur? Craig Mattice Atahualpa 3 Wordpress theme 2 Apr 30, 2009 03:26 PM
Settings Not Saving Until Logout ieatgravel Atahualpa 3 Wordpress theme 3 Apr 14, 2009 05:25 AM
[SOLVED] Very minor : page menu bar home option dcousquer Page & Category Menu Bars 1 Dec 13, 2008 03:52 AM


All times are GMT -6. The time now is 04:42 AM.


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