Title: Adding admin menu functionality
Last modified: August 18, 2016

---

# Adding admin menu functionality

 *  [clarke1866](https://wordpress.org/support/users/clarke1866/)
 * (@clarke1866)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/adding-admin-menu-functionality/)
 * For more details, [please see this post](http://wordpress.org/support/topic.php?id=29205#post-164402).
   This is the shortform:
 * I need help on inserting the proper code into the wordpress admin backend to 
   allow a user to edit the various options of my created plugin. I have read extensively
   on the subject, but since I am a learning php from scratch (with very limited
   programming background) I am just going in circles. It seems the wordpress codex
   is written by developers for developers, which is fine, except that I am missing
   some key chunks of basic knowledge (for example, why do I need to define my own
   functions?). Anyway:
 * How can I insert my options form into wordpress? — My present form is self submitting,
   and writes the configuration to an ini file in the plugins’ own directory (flat
   file).
 * From my research I have figured out that I need something like the following 
   code in a file in the /wp-content/plugins/ directory:
    ` /* Plugin Name: WP-My
   Name Plugin URI: someurl Description: Blah. Version: 0.001 Author: Me Author 
   URI: someurl */
 * add_options_page(__("Plugin Test Page"), __('PlugTest'), 5, plugdir(__FILE__).'
   form.php');
 * At which point the form.php would take over by including and reading the ini 
   file, and various other files in the plugdir.
 * The problem is that this doesnâ€™t work. What am I doing wrong? I have tried 
   looking at other authors methods, but frankly what they do is way over my head.
   I need a simple example.

Viewing 4 replies - 16 through 19 (of 19 total)

[←](https://wordpress.org/support/topic/adding-admin-menu-functionality/?output_format=md)
[1](https://wordpress.org/support/topic/adding-admin-menu-functionality/?output_format=md)
2

 *  [altjira](https://wordpress.org/support/users/altjira/)
 * (@altjira)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-admin-menu-functionality/page/2/#post-179054)
 * Thanks to you, Lisch. I was trying the same thing, following closely the [http://codex.wordpress.org/Adding_Administration_Menus](http://codex.wordpress.org/Adding_Administration_Menus)
   guidelines and examples, and it wasn’t working – but you reminded me _I had to
   activate the plugin_. Duh!
 *  [skippy](https://wordpress.org/support/users/skippy/)
 * (@skippy)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-admin-menu-functionality/page/2/#post-179055)
 * clarke1866: I copied and pasted your sample code into a file, wp-content/plugins/
   test.php (adding the <?php and ?> tags, of course) and it worked fine. WordPress
   1.5.1.2.
 *  [dp76](https://wordpress.org/support/users/dp76/)
 * (@dp76)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/adding-admin-menu-functionality/page/2/#post-179094)
 * add_options_page(‘Test Options’, ‘Test Options’, 8, __FILE__, ‘mt_options_page’);
 * Don’t work correctly at WindowsOS. __FILE__ return incorrect value
 *  [dp76](https://wordpress.org/support/users/dp76/)
 * (@dp76)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/adding-admin-menu-functionality/page/2/#post-179095)
 * str_replace(“\\”,”/”,__FILE__)
 * Will help

Viewing 4 replies - 16 through 19 (of 19 total)

[←](https://wordpress.org/support/topic/adding-admin-menu-functionality/?output_format=md)
[1](https://wordpress.org/support/topic/adding-admin-menu-functionality/?output_format=md)
2

The topic ‘Adding admin menu functionality’ is closed to new replies.

 * 19 replies
 * 7 participants
 * Last reply from: [dp76](https://wordpress.org/support/users/dp76/)
 * Last activity: [20 years, 3 months ago](https://wordpress.org/support/topic/adding-admin-menu-functionality/page/2/#post-179095)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
