Posts Tagged Widget

How to use widget multiple times

In WordPress 2.8, there’s a new widget API. The new widgets API is a class that abstracts away much of the complexity involved in writing a widget, especially multi-widgets.

Basically, you extend WP_Widget with your own class that provides a constructor and three methods — widget(), form(), and update().

  • widget() – outputs the actual content of the widget.
  • update() – processes options to be saved.
  • form() – outputs the options form.

* The WP_Widget source can be viewed here (read the phpdoc for moreinfo on usage): http://core.trac.wordpress.org/browser/trunk/wp-includes/widgets.php
* You can see examples of how to use it here: http://core.trac.wordpress.org/browser/trunk/wp-includes/default-widgets.php

Here’s an execelent example of the widget.

, , , , , , , , ,

No Comments

WordPress google map plugin

Here’s  a cool plugin that I will use. This plugin allows you to add multiple addresses to a post/page and have those addresses automatically plotted on a Google Map in a sidebar widget or directly in the post/page. This is a great plugin to help localize your stories, events, news, etc. Hovering over a plot will display the title of the post, address, and also a thumbnail from the post if any images exist. Easily add and delete a single or multiple addresses to each post/page. Viewing a single post/page displays only addresses attached to that post/page, viewing anything else will show the most recent plots across your entire site. You can also set a custom title and description for each address saved. If no title or description is entered the post title and excerpt will be used.

Download here

, , , , , , ,

No Comments