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 »

Adding login/logout menu option.


  #1  
Old Feb 7, 2009, 12:04 PM
soop
 
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?
  #2  
Old Feb 7, 2009, 01:05 PM
Flynn's Avatar
Flynn
 
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.
  #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,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 
  #6  
Old Mar 19, 2009, 08:37 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
This is great! Thanks!
  #7  
Old Mar 19, 2009, 10:17 AM
jenyum
 
3 posts · Mar 2009
Yes, thank you from me as well. Worked like a charm.
  #8  
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
  #9  
Old Mar 21, 2009, 10:48 AM
Flynn's Avatar
Flynn
 
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
  #10  
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
  #11  
Old Sep 11, 2011, 08:43 PM
bvimusic
 
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?
  #12  
Old Sep 12, 2011, 05:57 AM
juggledad's Avatar
juggledad
 
23,765 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
  #13  
Old Sep 12, 2011, 01:01 PM
bvimusic
 
25 posts · Jul 2010
This is what I have done. It works really well.
Thank you!

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 03:16 PM.


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