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

New Widget Area named after logged user ID


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

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
 
Prev Previous Post   Next Post Next
  #1  
Old Sep 12, 2010, 07:29 AM
thanos
 
5 posts · Feb 2010
Athens, Greece
New Widget Area named after logged user ID

Hi,
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;
get_currentuserinfo();

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...

Thanks
 

Bookmarks

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 02:54 AM
[SOLVED] Comments link not showing when not logged in sargemarcori Forum How-To 1 Jun 2, 2010 04:27 PM
Positioning widget onto logo area creates extra spacing in the overall header area cab262 Header configuration & styling 1 May 20, 2010 02:14 PM
Why doesn't Atahualpa use an externally named CSS file? Elms123 Header configuration & styling 2 Mar 22, 2010 05:45 PM
[SOLVED] Help ! Links broken in widget in new widget area mikecnwa Sidebars & Widgets 4 Sep 16, 2009 02:56 PM


All times are GMT -6. The time now is 07:08 PM.


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