Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a plugin that adds a number of admin pages, and drives two page templates for the public facing documents. It also loads one dashboard widget for "subscribers". In this widget is a list of links to a summary pages. The summary page is located in the plugin directory tree, and has the same ownership and privileges as all other php files.

The links appear and I can click on them, but get the "you do not have permissions to access this page" notice.

In the plugin functions, I have declared this function:

function pgc_certificate_display() {
    include('pg-certificate-display.php');
}

In plugin initialization I declare the page slug:

add_users_page('edit.php?post_type=page', 'Certificates', 'Certificates', 'read', 'certificate-display', 'pgc_certificate_display');

In the code that manufactures the list of summary pages is in the dashboard widget php, where the URL is constructed as follows:

$_SERVER['SCRIPT_NAME'] . '?page=certificate-display&cert_number=' . $cert['cert_number']

I have error display enabled and none are being raised.

What are the incorrect bits in this?

share|improve this question

1 Answer 1

This is not the best solution, but it worked so we made deadline.

I created a child theme and a page template, which allowed me to write a simple URL to open the page.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.