Creating template page for my plugin in WordPress

I was following a tutorial, but when they have done it, there was an option for the plugin and the form page was showing

I was following a tutorial, but when they have done it, there was an option for the plugin and the form page was showing, but in my case it did not work. Do I need to add action hook?

The code is as follows:

/*
Plugin Name: Login Form Plugin
Author: Mitaly
version: 0.0.3
Description: This is a custom plugin
*/
<?php
//add custom page fanction
function DBP_add_front_page(){
  //include insertion code
  include_once("form_template.php");
  DBP_insert_data();
}
//define absolute path to avoid direct ArrayAccess
 if(!defined('ABSPATH'))
 {
   define('ABSPATH',dirname(__FILE__) . '/');

 }

 //including database files

 include_once("employess-form.php");

 //register hook

 register_activation_hook(__FILE__,"DBP_tb_create");

 //filter
 add_filter('page_template','DBP_add_front_page');
  ?>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742351142a4427541.html

相关推荐

  • Creating template page for my plugin in WordPress

    I was following a tutorial, but when they have done it, there was an option for the plugin and the form page was showing

    3小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信