Wordpress Plugin Development tutorial from scratch (Part 10) Wordpress Page on plugin activation
In this video session i have explained about creating database table while plugin activation, #WordpressTutorialsPoint #WordpressLearnersHub #WordpressCustomizations #LearnWordpressStepbyStep #WordpressBySanjay Steps to do this task: #1: Create Custom Post Code to Wordpress #2: Embed generated code to function #3: Bind with action hook First we need Create Post code, =============== // code for create page $page = array(); $page['post_title']= "Custom Plugin Online Web Tutor"; $page['post_content']= "Learning Platform for Wordpress Customization for Themes, Plugin and Widgets"; $page['post_status'] = "publish"; $page['post_slug'] = "custom-plugin-online-web-tutor"; $page['post_type'] = "page"; $post_id = wp_insert_post($page); // post_id as return value Documentation of 'wp_insert_post' : https://developer.wordpress.org/reference/functions/wp_insert_post/ Then we have to make a seperate function to run, // create post function, function create_page(){ // code for create page $page = array(); $page['post_title']= "Custom Plugin Online Web Tutor"; $page['post_content']= "Learning Platform for Wordpress Customization for Themes, Plugin and Widgets"; $page['post_status'] = "publish"; $page['post_slug'] = "custom-plugin-online-web-tutor"; $page['post_type'] = "page"; $post_id = wp_insert_post($page); // post_id as return value add_option("custom_plugin_page_id",$post_id); // wp_options table from the name of custom_plugin_page_id } and Finally we have to attach with Action hook, register_activation_hook(__FILE__,"create_page"); To create table while plugin activates, Click here to see: https://www.youtube.com/watch?v=nzRyFF95jXI Delete table while plugin deactivates/Uninstalls, Click here to see: https://www.youtube.com/watch?v=sa28dHu6YCA SOCIAL : =============== Subscribe : https://www.youtube.com/channel/UCB2flCo-gW6RhpVVXySqcMg FACEBOOK : https://www.facebook.com/onlinewebtutorhub/ TWITTER: https://twitter.com/owthub BLOG: https://onlinewebtutorhub.blogspot.in/ RECOMMENDATION: =============== 1. Some knowledge of PHP, HTML for this video series 2. How to Install Wordpress: https://www.youtube.com/watch?v=MREgql9jmf0 3. register_deactivation_hook: https://developer.wordpress.org/reference/functions/register_deactivation_hook/ Also you can learn Wordpress Custom =============== Theme Development: https://www.youtube.com/watch?v=MREgql9jmf0&list=PLT9miexWCpPV9WxY_QG3qxUGKzw54LboW Widget Development: https://www.youtube.com/watch?v=ZSbdYG1svV8&list=PLT9miexWCpPUgibUXDZ7JP1j3U-m61U8m Tags =============== online web tutor, profotech solutions, wordpress plugin development from scratch in hindi, wordpress plugin development from scratch in easy steps, wordpress plugin development, wordpress plugin development in easy steps, plugin development in wordpress from scratch in hindi, plugin development in wordpress by online web tutor, plugin development in wordpress tutorials from scratch in hindi, plugin theme development tutorials in hindi, plugin development tutorials in hindi, owt tuts, Thanks Online Web Tutor Keep learning and Sharing :) -~-~~-~~~-~~-~- Please watch: "Learn backbone.js tutorial from scratch" https://www.youtube.com/watch?v=HOAU-nfy5Sc -~-~~-~~~-~~-~-
Download
0 formatsNo download links available.