Posted inTechnology / php / Programming / wordpress

Create WordPress Custom Admin Page

Today, We want to share with you Create WordPress Custom Admin Page.In this post we will show you how to add menu in wordpress admin dashboard, hear for wordpress create admin page without menu we will give you demo and example for implement.In this post, we will learn about how to create custom form in wordpress admin panel with an example.

Create WordPress Custom Admin Page

There are the Following The simple About Simple WordPress Custom Admin Page Full Information With Example and source code.

As I will cover this Post with live Working example to develop create custom option page in wordpress, so the wordpress create plugin Directory structures for this example is following below.

Creating a WordPress Custom Admin Plugin

  • Title displayed inside of the page
  • Title displayed in admin menu panel
  • Specifying admin roles
  • A pages url slug
  • Function for specifying file, which will be used for admin page, in this case ‘custom_page’
  • Url for custom menu icon
  • A position in menu

Step 1: Admin Registering Page

Registering Page in functions.php

function register_custom_page(){

	add_menu_page( 
		$page_title,
		$pages_menu_title,
		$capability, 
		$page_slug, 
		$function,
		$icon_url,
		$position 
	); 
	
}
add_action( 'admin_menu', 'register_custom_page' );

function custom_page(){
	
	require('custom.php');
	
}

Setting Up Admin Page File

Step 2: Custom Add CSS

Adding Custom CSS


function cutom_css_enqueue() {

    wp_register_style( 'custom_css', get_stylesheet_directory_uri() . '/css/custom.css' );

    wp_enqueue_style( 'custom_css' );

}
add_action( 'admin_enqueue_scripts', 'cutom_css_enqueue' );

Step 3: Custom Add JavaScript

JavaScript


function cutom_js_enqueue() {

    wp_enqueue_script( 'custom_js', get_stylesheet_directory_uri() . '/js/custom.js' );

}
add_action( 'admin_enqueue_scripts', 'cutom_js_enqueue' );

Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Make a WordPress Custom Admin Page.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

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

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype