How to add the Meta box to wordpress admin post page

Sponsors

Use following code and create wordpressapi.php file and upload this file to wp-content/plugins/ folder.


<?php
/*
Plugin Name:  WordPressapi Meta Box
Plugin URI: http://images.wordpressapi.com/
Description: Adding the Meta box to admin panel -> post
Version: 0.0
Author: WordPressapi
Author URI: http://images.wordpressapi.com/
*/

function wordpressapi_meta_box() {
add_meta_box(
'wordpressapi',
'Wordpressapi Box', //Meta box title
'write_in_meta_box',
'post' // You can define here where to add the Meta box(post, page, link)
);
}

function write_in_meta_box(){
echo "Wordpressapi is writing something in admin meta box";
}

if (is_admin())
add_action('admin_menu', 'wordpressapi_meta_box');
?>

wordpressapi_metabox
Go to your Plugin tab and activate the “WordPressapi Meta Box” plugin.
After activating the plugin you are able to see the Meta box on post page.

Incoming search terms:

You may like following Articles!

This entry was posted in wordpress, wordpress api and tagged , , by Wordpress API. Bookmark the permalink.

About Wordpress API

API means Application Program interface. In Wordpress API we are giving all the information about wordpress API. We worked for many wordpress plugins and themes. We have expertise in PHP, Databases, Graphic Design, Ruby on Rails, Java, Wordpress, Drupal and many CMS. We always give you the best solutions about wordpress and other related topics in This Blog. We will give you always fresh tips and tricks and techniques about wordpress in this blog.

2 thoughts on “How to add the Meta box to wordpress admin post page

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>