how to use ajax in wordpress

There are few simple steps to use ajax in wordpress: – ajax calling template/page file element (button / link) – ajax calling and response handler script in js/jqery – wordpress hooks defined to handle ajax functions – php function file to define functions to operate. Files used in wordpress: – any template file or page […]

View Post

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

Install wordpress at your localhost

WordPress is a widely used CMS because of its simplicity and easy to use admin dashboard. Follow the basic steps to install it on your local machine: – I am considering your lamp/wamp/xampp is already installed and running in your machine. – Download latest version of your wordpress from and unzip it into wamp/www/wordpress folder, you […]

View Post