-1

My plugin has a settings page. It's working fine. Now, i want to put a html link within this page. This link will go to another settings page. How could I do that? Thanks.

1 Answer 1

1

Just use old simple HTML, the <a> tag.

<a href="admin.php?page=yourplugin/another-page.php" title="another page">Another Page</a>

If your page is php only:

echo '<a href="admin.php?page=yourplugin/another-page.php" title="another page">Another Page</a>';

Where yourplugin is your plugin folder name, and another-page.php is that other page.

2
  • But I don't want to leave wordpress... i want to stay there... It's just another settings page. Thanks.
    – thom
    Jul 27, 2011 at 13:48
  • You can use relative urls, the fact that you use html doesn't mean you're leaving wordpress, you could use: <a href="themes.php?page=another_page">Another page</a> and that'll take you to http://yoursite/wordpress/wp-admin/themes.php?page=another_page I'll update my answer
    – Mario
    Jul 27, 2011 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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