Tutorial by Examples

add_action('init', 'process_post_data'); function process_post_data() { if( isset( $_POST ) ) { // process $_POST data here } }
add_action('init', 'process_get_data'); function process_get_data() { if( isset( $_GET ) ) { // process $_GET data here } }
add_action( 'init', function() { register_post_type( 'event', array( 'public' => true, 'label' => 'Events' ); ); }); Registers a new custom post type with a label Events and a slug event

Page 1 of 1