Tagged: widget Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 11:08 pm on April 5, 2014 Permalink | Reply
    Tags: , widget   

    Categories: WordPress ( 144 )   

    How to add your own widget to the WordPress Dashboard 

    wordpress-iconNow that we’ve removed a few widgets, perhaps it’s time we add our own simple info box to the WordPress Dashboard.

    For example, we could provide a direct link to our support services. It’s handy for clients to know help is just a click away.

    Here’s how to add a simple box like that:

    //Add a new widget to the Dashboard
    function contact_help(){
         echo 'If you have questions about working with WordPress system, contact Jay at noreply@wphosting.tv or call 305-555-1234';
    function register_widgets(){
         wp_add_dashboard_widget( 'contact_help_widget', 'Need help?', 'contact_help');
    add_action('wp_dashboard_setup', 'register_widgets' );

    Add this code to your theme’s functions.php file. Note that if you (or your client) activates a different theme the widget will disappear.

    Here’s what the code does: first we create a function that simply writes out the text that’s displayed inside our widget (contact_help). Next in register_widgets we register our widget in the WordPress Dashboard. This won’t do anything yet, as the register_widgets function is not called. We do that in the next step when we hook it into the wp_dashboard_setup action.

    Remember this is sample code – you probably want to prefix your own functions with something unique.

    You can find out more in the WordPress Widget API.

  • Jay Versluis 12:43 pm on March 26, 2011 Permalink | Reply
    Tags: , , , , widget,   

    Categories: Screencast ( 87 ), WordPress ( 144 )   

    Adding Links to your Website 

    In this podcast I will show you how to add links to your sidebar.

    WordPress has a very convenient Links Manager in the backend. You can use it to either display and share your links, or if you want to remember a link for later just pop it in and it’ll be stored in a convenient and save place.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc