Hi, I need a WP Plugin created for a super simple widget that you just drag to where it needs to be. No settings can be configured, only drag and drop. On the front-end it should then display a linked image. That's all. I have messed a bit around and tried this: <?php /* Plugin Name: Img-widget Plugin URI: http://test.com Description: To automatically display sidebar img. Version: 1.0 Author: test Author URI: http://test.com */ error_reporting(E_ALL); add_action("widgets_init", array('Widget_name', 'register')); class Widget_name { function control(){ echo 'I am a control panel'; } function widget($args){ echo $args['before_widget']; echo $args['before_title'] . 'Your widget title' . $args['after_title']; echo '<img src="https://tpc.googlesyndication.com/simgad/11090750883171998112">'; echo $args['after_widget']; } function register(){ register_sidebar_widget('Widget name', array('Widget_name', 'widget')); register_widget_control('Widget name', array('Widget_name', 'control')); } } ?> PHP: But it doesn't seem to work at all. Anyone who could give a point in the right direction.
Hi there, I've just tests it on my own site, WP version 3.5.1 and a custom theme. It is working perfect. You just have to be sure that you put your PHP file in plugins/ folder. Then you have to activate the plugin. Then go to "widgets" setting and you should find it as "Widget Name". Drag & Drop works and your plugin is visble in my sidebar. BR, Marcel
Hey Marcel, Yeah it did work actually, I messed up some settings on my test-server that caused everything to make errors Thanks for your reply though!