Putting a wordpress custom post into a widget

You will need a “form” and an “update” method for your widget class. function form($instance) { $instance = wp_parse_args( (array) $instance, array (‘show’) ); $show = (!empty($instance[‘show’])) ? $instance[‘show’] : ”; echo ‘<input type=”text” name=”‘.$this->get_field_name(‘show’).'” value=”‘.esc_attr($show).'” />’; } function update($new_instance, $old_instance) { $instance = $old_instance; $instance[‘show’] = ($new_instance[‘show’]) ? $new_instance[‘show’] : 1; return $instance; } … Read more

widgets in contacts only

there are many plugins for that, try this one, its pretty easy: http://wordpress.org/extend/plugins/widget-context/ or if you dont want to use a plugin, add a new sidebar to the specific page u desire: http://www.blogohblog.com/adding-extra-sidebar-to-your-wordpress-theme/

How to remove calendar widget?

It’s easy to remove a default widget from WordPress. Just add this to your functions.php file: function remove_calendar_widget() { unregister_widget(‘WP_Widget_Calendar’); } add_action( ‘widgets_init’, ‘remove_calendar_widget’ ); See more here: http://codex.wordpress.org/Function_Reference/unregister_widget

Tabbed navigation in widget backend

I checked the markup and core WordPress code to find out how it handles categories and came to the conclusion that all the categories are get loaded on page load and at a time either All Categories or Most Used is displayed by manipulating it using jQuery(on mouse click showing and hiding category-pop & category-all … Read more

Using a loop to build and update widgets

I am not sure I followed your code correctly, but you could try to set all data into one array: name=”unique_widget_name[<?php echo $this->get_field_name($i); ?>][‘name’]” Very similar question, but not identical: How to store widget fields data as an array?

Widget Development – Displaying dropdown content

$instance[‘page_id’] should be the post ID of the selected post. So … function widget($args, $instance) { $post = get_post( $instance[‘page_id’] ); echo $post->post_content; // you should add the common filters here var_dump( $post ); // more data } … should be a good start. To save the last value in the configuration form use selected(): … Read more