how to make custom plugin in wordpress step by step code example

Example: how to make wordpress plugin step by step

<?php /* Plugin Name: My Plugin Plugin URI: plugin url Description: Basic WordPress Plugin Custom Post Type Version: 1.0 Author: Author name Author URI: Author URL License: GPL2 License URI: Licence URL */ 
function custom_setup_post_type() { 
	  $args = array( 'public' => true, 'label'     => __( 'Custom Post', 'textdomain' ));
      register_post_type( 'custom_post', $args );
}
add_action( 'init', 'custom_setup_post_type' );
?>

Tags:

Misc Example