• Resolved dunkkan

    (@dunkkan)


    Hello guys,

    I’d like to set up a new Page under Presentation, where the user writes a ‘welcome message’ for his blog, pretty much as the blog’s description does, but in a page of its own.

    Reading the Codex, I came up with this bit of code, a kind of foundation for that purpose :

    <?php
    add_action('admin_menu', 'my_plugin_menu');
    
    function my_plugin_menu() {
      add_options_page('My Plugin Options', 'My Plugin', 8, __FILE__, 'my_plugin_options');
    }
    
    function my_plugin_options() {
      echo '<div class="wrap">';
      echo 'Here is where the form would go if I actually had options.
    ';
      echo '</div>';
    }
    ?>

    From there on, I’m pretty lost on how to manage all that PHP, what to add, etc.

    If the final result must be a simple box, to fill with some text, then output it in index.php … can anybody tell me what to do ?

    I know I could use the text widget but I prefer to keep it separated.

    Thanks very much indeed,

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Add a Menu in the Dashboard’ is closed to new replies.