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
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.
-
But I don't want to leave wordpress... i want to stay there... It's just another settings page. Thanks.– thomJul 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 tohttp://yoursite/wordpress/wp-admin/themes.php?page=another_page
I'll update my answer– MarioJul 27, 2011 at 13:51