WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to wordpress development so please be patient if my question sounds simple or ridiculous, since I have been doing object oriented programming in PHP so i wanted to use the OOP approach in wordpress plugin development as well and came across Boilerplate. I have gone through the code in detail but I am still confused.

At present it comes with a view of admin.php, i wanted to create another page for testing purpose so i created a file view/admin2.php, I then want to create a hyperlink in admin.php to redirect the user to admin2.php, how can i do it? if i simply do the following, it does not work and gives me 404 error

<a href="admin2.php">go to admin 2</a>

I know i can create a sub menu but i do not want to do that yet. I will really appreciate any help here.


This is what my admin.php looks like

echo '<a href="'. plugins_url( 'admin2.php' , __FILE__ ) .'">Go to admin 2 page</a>';

This is what my admin2.php looks like

echo '<a href="'. plugins_url( 'admin.php' , __FILE__ ) .'">Go to admin page</a>';
share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.