Title: problem creating own wordpress plugin
Last modified: August 19, 2016

---

# problem creating own wordpress plugin

 *  [forcerdj](https://wordpress.org/support/users/forcerdj/)
 * (@forcerdj)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-creating-own-wordpress-plugin/)
 * i am trying to create my own plugin that has an admin menu, according to codex
   it should look something like this:
 *     ```
       if (is_admin()) {
   
       	function vb_widget_admin_menu() {
   
       		add_options_page("vBulletin Widget", "vBulletin Widget", 1, "vBulletin Widget", "vb_widget_html_page");
       	}
   
       	add_action('admin_menu', 'vb_widget_admin_menu');
       }
       ```
   
 * i keep getting the error: when trying to access my admin page
    You do not have
   sufficient permissions to access this page.
 * ive tried taking away is_admin, i’ve tried changing 1 to administrator or 8.
 * any ideas?

Viewing 1 replies (of 1 total)

 *  [tepelstreel](https://wordpress.org/support/users/tepelstreel/)
 * (@tepelstreel)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-creating-own-wordpress-plugin/#post-1858872)
 * Try this:
 *     ```
       function vb_widget_admin_menu() {
   
       add_options_page("vBulletin Widget", "vBulletin Widget", 1, "vBulletin Widget", "vb_widget_html_page");
   
       }
   
       if (is_admin()) {
   
       	add_action('admin_menu', 'vb_widget_admin_menu');
       }
       ```
   
 * That calls your function, if you are logged in as admin. In your code, the function
   was only created in that case.

Viewing 1 replies (of 1 total)

The topic ‘problem creating own wordpress plugin’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [tepelstreel](https://wordpress.org/support/users/tepelstreel/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/problem-creating-own-wordpress-plugin/#post-1858872)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
