Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6331493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:04:47+00:00 2026-05-24T18:04:47+00:00

My plugin which adds a menu in admin page has two files. The code

  • 0

My plugin which adds a menu in admin page has two files.

The code of the main file (special.php) is as follows:

add_action('admin_menu', 'my_add_pages');
function my_add_pages() {
  add_menu_page('special', 'special', 'manage_options', __FILE__, 'specialPage');
}
function specialPage() {
  ....
}

In the function specialPage(), I write a link:

<a href="admin.php?page=special/special_edit.php?do=edit&id=<?php echo $spec->spec_id;?>">Edit<a>

I write this link because i want to go to another file special_edit.php. The file is in the same folder (plugin/special) as special.php.

However when i click the “Edit” link, it reminds me that “You do not have sufficient permissions to access this page”.

Where does the problem come from? How can I solve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:04:48+00:00Added an answer on May 24, 2026 at 6:04 pm
    admin.php?page=special/special_edit.php?do=edit&id=...
    

    I think you must replace the second ? with a &
    And probably drop the .php extension of the page parameter (just guessing, here, I haven’t hacked WordPress much).

    [UPDATE] I checked, and it seems that with add_menu_page, you should use an identifier like 'special_edit' in the menu slug, instead of __FILE__. Would look nicer anyway, and will be independent of your file names.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'mt trying to create a plugin which adds a custom page in the admin
I have modified the buddypress admin bar by creating the following plugin which adds
I created a Gedit 2 plugin which adds an item to a menu as
I'm creating a small code plugin which allows you to do some things with
I am looking for a refactoring plugin which specifically has the ability to take
Rails has the rest autho plugin which works well but is there a solution
I'm creating a jQuery plugin which adds some custom animations to an element and
Is there a plugin for sbt available which automatically installs JRuby and adds some
I have wrote this simple plugin which smooth scrolls the browser window and adds
Is there a firefox plugin which functions as an SVN client? I have checked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.