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'm making an admin page for my plugin and I'd like to make a text link designed like the form button of admin pages.

I tried this but didn't work well.

<a href="" cless="button-primary" style="line-height: 2em; border-color: #298CBA; font-weight: bold; color: white; background: #21759B url(../images/button-grad.png) repeat-x scroll left top; text-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0;">Submit</a>

I also tried just putting a submit button, expecting that the page goes to the url in the action attribute.

<form action="$url" target="_self">
    <input type="submit" class="button-primary" value="Submit" />

Does anybody know how?

share|improve this question
The main issue is probably the misspelling of class, you have cless... – Eric Holmes Oct 3 '13 at 19:39
If your question has been answered, please accept the correct answer. – Ciprian Mar 23 '15 at 11:21

You can style a link as a button with the button css class:

<a href="#" class="button">I am a button</a>

You can modify a button with the primary styling by adding button-primary:

<a href="#" class="button button-primary">I am the primary button</a>
share|improve this answer

This worked,

$pageslug = 'the-plugin-option-page-slug';
    <form method="post" action="?page=<?php echo $pageslug; ?>&tab=2">
        <input type="submit" class="button-primary" value="Submit" />       

I have tabbed option pages and the button just works like a link to the tab 2 page without submitting anything.

share|improve this answer

Your Answer


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.