WordPress WP_ADMIN_DIR Constant

There are various ways to set (and get) wordpress admin directory. I do not understand why wordpress has not included that! Method 1: if (!defined('WP_ADMIN_DIR')) define('WP_ADMIN_DIR', './wp-admin/'); In this method the WP_ADMIN_DIR constant will be very vague and will create … Continue reading →

wordpress-sidebar-widget

Creating simple WordPress 2.8+ widget

WordPress widgets is a great feature for displaying your content in sidebar. It is easy to create by extending WP_Widget predefined wordpress class. Constructing Widget class your_widget extends WP_Widget { public function __construct() { $this->WP_Widget( ‘your_widget_unique_id’, __(‘Your Widget Title’), array(‘description’ … Continue reading →