Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Adding login/logout menu option. (http://forum.bytesforall.com/showthread.php?t=267)

soop Feb 7, 2009 12:04 PM

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:

http://img15.imageshack.us/img15/3381/theme1ra9.jpg

Can you offer any help please?

Flynn Feb 7, 2009 01:05 PM

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.

soop Feb 7, 2009 05:04 PM

Thank you very much Flynn. That output buffer is a useful tool.

Congratations on such a great theme.

jenyum Mar 19, 2009 02:30 AM

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.

Flynn Mar 19, 2009 06:53 AM

Add it in functions/bfa_header_config.php right before

PHP Code:

$page_menu_bar .= '</ul></div>' "\n";
// END of Page Menu Bar 


paulae Mar 19, 2009 08:37 AM

This is great! Thanks!

jenyum Mar 19, 2009 10:17 AM

Yes, thank you from me as well. Worked like a charm.

ddcat Mar 21, 2009 09:08 AM

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:confused:

Flynn Mar 21, 2009 10:48 AM

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

Pshill Jan 10, 2011 11:18 AM

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

bvimusic Sep 11, 2011 08:43 PM

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?

juggledad Sep 12, 2011 05:57 AM

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

bvimusic Sep 12, 2011 01:01 PM

This is what I have done. It works really well.
Thank you!


All times are GMT -6. The time now is 03:09 AM.

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