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

New Widget Area named after logged user ID


 
Prev Previous Post   Next Post Next
  #1  
Old Sep 12, 2010, 06: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 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:53 AM.


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