Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am reading this tutorial from the end of 2008 on how to make widget and so far everything works fine except that I have few questions that I couldn't find answers there.

I need to style back end widget form somewhat different and for that purpose I would like to be able to add class to it that will render only in dashboard.

I am using these 2 functions to build my widget:

 wp_register_sidebar_widget(SAASJOTC_WIDGET_ID,
    __('Text Ripple'), 'widget_saasjotc');

  wp_register_widget_control(SAASJOTC_WIDGET_ID,  
    __('Text Ripple'), 'widget_saasjotc_control'); 

Is this method deprecated considering year of the article I am reading? If yes please could you provide me with better way and why?

With this method I can add only one widget to the sidebar and I need to be able to add more. How can this be achieved?

Any help appreciated. Sorry if there are any difficulties in my description. I'll be happy to clarify it further for you if need arises.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I don't know if the tutorial uses any deprecated function, you can check that enabling WP_DEBUG in your wp-config.php.

Anyway, by the time it was written the new Widgets API didn't exist.

The Codex is your friend, read the Codex:
http://codex.wordpress.org/Widgets_API

And for styling the widgets admin area refer to this post:
Highlight custom widgets in the admin area?

share|improve this answer
    
Thanks man, that helps. –  daniel.tosaba May 12 '12 at 22:05
    
Glad to hear :) –  brasofilo May 12 '12 at 22:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.