0
我想創建一個wp插件來顯示數據庫中的記錄。我已經在數據庫中添加了一個表格,並且希望在post.php頁面編輯器下的wp-admin post.php頁面中獲取並顯示記錄。如何在wp-admin/post.php中創建一個wordpress插件頁
我的post_id在我的表中作爲外鍵。所以我想獲取所選post_id的記錄。
這是我的插件代碼.....作秀記錄以下網頁編輯器
<?php
/*
Plugin Name: Kiosk User Info
Plugin URI: http://pixako.com
Description: This is Kiosk User Info.
Author: Muhammad Asfund Yar - Pixako
Version: 1.0
Author URI: http://pixako.com
*/
/* Plugin Main Page/Setting Page*/
function KioskUserInfo_mainPage(){
echo "<br />This is main page of plugin<br /> Go to the post page. here we are using it. <br /> Thanks";
}
/*Plugin Working Area*/
function KioskUserInfo_postPage(){
echo "I want this code to show in wp-admin/post.php page under editor.";
}
add_action('registered_post_type', 'KioskUserInfo_postPage');
/*Menu Links*/
function KioskUserInfo_menu(){
add_menu_page('Kiosk User Information Plugin','Kiosk User Info', 'manage_options','kiosk-user-info-mainpage','KioskUserInfo_mainPage');
}
add_action('admin_menu','KioskUserInfo_menu');
?>
謝謝。它的工作.... –
如果它的工作,那麼請投票支持未來的用戶 – Yatendra