Category Archives: Wordpress

WYSIWYG Editor for your custom box

If you have a custom text box in the edit post page, and you want to have the built-in editor, it’s quite easy to do.

Posted in Wordpress | Tagged , , , | Leave a comment

Creating a custom widget

Here is the basic code to use to create a widget. class myWidget extends WP_Widget { function myWidget() { // widget actual processes parent::WP_Widget(false, $name = ‘myWidget’); } function form($instance) { // outputs the options form on admin } function … Continue reading

Posted in Wordpress | Tagged , , | Leave a comment

Custom Boxes in Posts

You can create a custom box in post/page/custom-post-type by adding a couple of actions and telling it to trigger for the post-type. 1. add_action( ‘add_meta_boxes’, ‘people_add_custom_box’ ); // this hooks into the ‘add_meta_boxes’ action, and calls the function people_add_custom_box 2. … Continue reading

Posted in Wordpress | Tagged , | Leave a comment

Theme Options

If you want to create a menu in wp-admin for Theme Options ( Appearance->Theme Options), you can start with this http://themeshaper.com/2010/06/03/sample-theme-options/ Just download the zip file, search and replace “sample” of theme-options.php with your theme name. in functions.php add require_once … Continue reading

Posted in Wordpress | Tagged , , | Leave a comment

WordPress post formats

WordPress 3.1 introduces post-formats. You have to activate this “feature” and it gives you a new admin box in the posts type. Although this isn’t a big new feature, it is quite common for sites to have quotes, videos, links, … Continue reading

Posted in Wordpress | Tagged , , | Leave a comment

Template Hierarchy

WordPress themes (templates) are the best in the business because its the easiest. The minimum requirement is 2 files: style.css and index.php. I usually start with style.css, index.php, header.php, footer.php and functions.php

Posted in Wordpress | Tagged , | Leave a comment