Adding menu page in admin end with WordPress


<?php
function file_admin() {
  include 'file.php';
}
 adding menu page => inside parameters with arrangements 1) page_title, 2) menu title, 3) capability, 4) file, 5) function, 6) icon, 7) position
 add_menu_page('Caros', 'Caros', 'read', 'caros/file.php', 'file_admin', 'images/menu.png','7');
 ?>
Getting custom field values
<?php $url = get_post_custom_values('url'); echo $url[0];?>
 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s