Beijing website constructionShangpin China (www.sino web. net): This article explains how to save the data in the database and display it on the page. The content in the input box will not disappear when the form is submitted.To realize this function, we need to use the WordPress function. Next, we will explain the specific implementation method, and paste the code first.According to the previous plug-in example, you can directly modify it.
<?php
//Display a submenu in WordPress background comments
add_action('admin_menu', 'my_plugin_menu2');
function my_plugin_menu2() {
Add_comments_page ('data saving ',' data saving ',' read ',' my unique identifier ',' my_plugin_function2 ');
//The information stored in the database is displayed through get_option().
//The above information is stored in the wp_options table in the database.
?>
The above short code implements the function of saving and displaying data. Through this function, we can extend to other methods or functions.For example, some good themes have theme settings, and some of the display and storage can be achieved using the above methods, so you can try more.The approximate effect is shown in the following example.
Well, that's all for this article. If you don't understand or have good suggestions, please ask questions and guide. This article was published by Beijing Website Construction Company Shangpin China//ihucc.com/