Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); ?>
- function create_post_type() {
- register_post_type( 'client_posttype',
- array(
- 'labels' => array(
- 'name' => __( 'Clients' ),
- 'singular_name' => __( 'Client' )
- ),
- 'public' => true,
- 'has_archive' => true,
- )
- );
- }
- add_action( 'init', 'create_post_type' );
- class options_page {
- function __construct() {
- add_action( 'admin_menu', array( $this, 'admin_menu' ) );
- }
- function admin_menu() {
- add_menu_page( 'Clients', 'Clients Page', 'edit_posts', 'clients_page', 'my_clients', '', 24);
- }
- function settings_page() {
- echo 'This is the page content';
- }
- }
- new options_page;
Add Comment
Please, Sign In to add comment