how to add meta option in post and pages.

step 1 function register() { add_meta_box ( ‘meta_options_metabox’, ‘my meta Options’, ‘meta_metabox’, ‘post’, ‘normal’, ‘high’ ); } /* add_meta_box( “metabox id” , “metabox title” , “callback function of HTML for metabox” , “position of metabox” “part of page where edit screen section should be shown”,”priority”,”callback arguments” ) a)  metabox id  -> id can be anything,whatever […]

View Post

How to Create Custom Widgets With custome functionality.

Step 1 Extend WP_widget class class MyNewWidget extends WP_Widget () /* WP_Widget class located in wp-includes/widgets.php */ Step 2 function MyNewWidget() { // Instantiate the parent object //parent::__construct( false, ‘My New Widget Title’ ); $widget_ops = array( ‘classname’ => ‘postsfromcat’, ‘description’ => ‘Allows you to display a list of thumbnail posts’); $control_ops = array( ‘width’ […]

View Post