Sidebar “Wrapper” Plugin/Widget?

I’m coming from a Joomla background and I’m setting up a WordPress installation for a friend’s Shoutcast station. I would have done the setup in Joomla, as I’m more familiar with it, but I wanted to be able to hand administration of the WP install over to my friend once it’s going, and I feel Joomla is a bit over her head.

We’re using the shout-stream plugin for providing a sidebar stream player. We don’t care for the stats display of shout-stream, so I was attempting to use a custom PHP what’s playing now script I wrote for another station page I did in Joomla. Joomla has a component/plugin that can encapsulate a PHP script and display it in the sidebar.

Read More

My question is:

Is there a similar plugin for WordPress?

I searched the plugin repository and found one which, at first glance, looked like it might work (wp-wrapper), but further checking indicates it has to be used only on a post or a page. We want the PHP script to run/display in the sidebar. Is there such a plugin for WP or am I stuck going back to Joomla?

Thanks
Dave

Related posts

Leave a Reply

1 comment

  1. You can use the WordPress widget API to create a custom widget containing your PHP script.

    Very simple example:

    class shoutcast_widget extends WP_Widget {
        function shoutcast_widget() {
        $widget_ops = array(
            'description' => 'Describe your widget here'
        );
            parent::WP_Widget(false, 'Name Your Widget Here', $widget_ops );  
        }   
        function widget( $args, $instance ) {
            extract( $args );
            extract( $instance );
            echo $before_widget; ?>
                <h3 class="widget_title">Your Widget Title</h3>
            <?php
    
            // Your Custom PHP Script Here That outputs the display
            echo $after_widget;
        }
    }
        register_widget( 'shoutcast_widget' );