[resolved] No menu items in administration (1 post)

  1. Speed_FANat1c
    Posted 5 years ago #


    I am new to wordpress. I am trying to write a plugin and want try to make options in administration.

    I have such code in my file:

    	Plugin Name: OSCommerce Productu rodymas
    	Plugin URI: http://www.google.lt
    	Description: Pluginas produktu roymui is OScommerce parduotuves
    	Author: Darius
    	Version: 1.0
    	Author URI: http://www.google.lt
    add_action('admin_menu', 'my_plugin_menu');
    function my_plugin_menu() {
    	add_options_page('My Plugin Options', 'My Plugin', 'manage_options', 'my-unique-identifier', 'my_plugin_options');
    function my_plugin_options() {
    	if (!current_user_can('manage_options'))  {
    		wp_die( __('You do not have sufficient permissions to access this page.') );
    	echo '<div class="wrap">';
    	echo '<p>Here is where the form would go if I actually had options.</p>';
    	echo '</div>';

    But no menu item appear in the administration area. Can you tell why is that?

    Edit: I have simply not activated it, thats why no menu was there :D

Topic Closed

This topic has been closed to new replies.

About this Topic