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 » Sidebars & Widgets »

New Widget Area named after logged user ID

Prev Previous Post   Next Post Next
Old Sep 12, 2010, 06:29 AM
5 posts · Feb 2010
Athens, Greece
New Widget Area named after logged user ID

I've been using Atahualpa for a long time but never had to post something in the forum as I always find what I'm looking for here..

What I want to do in my new web site is to automatically create a new widget area for every user that subscribes to it and name it after his/her id and last name (example: 2 Smith).

I can get the user info with this piece of code:

php global $current_user;

echo 'Username: ' . $current_user->user_login . "\n";
echo 'User email: ' . $current_user->user_email . "\n";
echo 'User level: ' . $current_user->user_level . "\n";
echo 'User first name: ' . $current_user->user_firstname . "\n";
echo 'User last name: ' . $current_user->user_lastname . "\n";
echo 'User display name: ' . $current_user->display_name . "\n";
echo 'User ID: ' . $current_user->ID . "\n";

What I'm looking for is the way to place the data from $current_user->ID and $current_user->user_lastname inside the command (bfa_widget_area('name=My new widget area') for creating the new widget areas.

I'm using Wordpress 3.0.1 and Atahualpa 3.5.3
My php skills are very very limited...



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to only display Page menu to logged in users? Thomas Page & Category Menu Bars 7 Jul 5, 2010 01:54 AM
[SOLVED] Comments link not showing when not logged in sargemarcori Forum How-To 1 Jun 2, 2010 03:27 PM
Positioning widget onto logo area creates extra spacing in the overall header area cab262 Header configuration & styling 1 May 20, 2010 01:14 PM
Why doesn't Atahualpa use an externally named CSS file? Elms123 Header configuration & styling 2 Mar 22, 2010 04:45 PM
[SOLVED] Help ! Links broken in widget in new widget area mikecnwa Sidebars & Widgets 4 Sep 16, 2009 01:56 PM

All times are GMT -6. The time now is 10:58 AM.

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