• Resolved boolean maybe

    (@boolean-maybe)


    Hi,

    I’m building a plugin for my wordpress on a hostmetro and admin account server the plugin installs fine and wordpress detects it however when I go to settings and click the plugin is show an error message.

    this error message displays:
    You do not have sufficient permissions to access this page.

    here is the plugin code:

    <?php
    /*
    Plugin Name: First Plugin
    Plugin URI: https://www.panda-ant.com
    Description: My first pluging lets hope this works
    Author: Jonathan
    Version: 1.0
    Author URI: https://panda-ant.com

    */

    add_action(‘admin_menu’, ‘firstplugin_admin_actions’);

    function firstplugin_admin_actions () {
    add_options_page(‘FirstPlugin’, ‘FirstPlugin’, ‘manage_options’, __FILE__, ‘firstplugin_admin’);
    }

    function firstplugin_admin()
    {
    ?>
    <div class=”wrap”>
    <h4>This is the html message the plugin displays</h4>
    <table class=”widefat”>
    <thead>
    <tr>
    <th> Post Title </th>
    <th> Post ID</th>
    </tr>
    </thead>
    <tfoot>
    <tr>
    <th> Post Title </th>
    <th> Post ID</th>
    </tr>
    </tfoot>
    <tbody>
    </tbody>
    </div>

    <?php

    }
    ?>

Viewing 1 replies (of 1 total)
  • Thread Starter boolean maybe

    (@boolean-maybe)

    Found the solution:
    My the name of the path didnt match the parameter in the firstplugin_admin_actions function.

    For anyone with the same problem make sure the path to get to the plugin matches the parameter in the function.

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin Permision’ is closed to new replies.