2012-08-03 143 views
0

我想在wordpress管理面板上創建一個單獨的菜單部分,其中將包含三個頁面。這些頁面的行爲與普通的WordPress頁面完全相同,我只想在管理面板中有一個單獨的菜單部分。我可以使用wp_editor()在窗體中顯示編輯器。我的問題是如何從編輯器獲取內容,以及如何保存到數據庫的wp_post中?以下是我已經拿出一段代碼: 如何在wordpress管理面板中創建新頁面

 <?php 
      $content = ''; 
      wp_editor('test', 'mydescription', array('textarea_name' => 'my_description', 'tinymce' => true)); 
     ?> 

     <p><div class="submit"><input type="submit" name="save_front_content_options" value="<?php _e('Save Changes', 'save_options') ?>" style="font-weight:bold;" /></div></p> 
     <input type="hidden" name="action" value="save" /> 
    </form> 

回答

相關問題