How to Add CSS Ghost Buttons in Your WordPress Theme – WPSaviour

By WP Saviour •  Updated: 10/29/20 •  3 min read

Lately certainly one of our readers requested us for a tutorial on find out how to add CSS Ghost buttons of their WordPress themes. Ghost buttons are the clear name to motion buttons that are extremely popular as of late. On this article, we’ll present you how one can simply add CSS ghost buttons in your WordPress theme utilizing little or no CSS and HTML.


What’s Ghost Button?

Ghost button is an internet design terminology used for clear buttons that mix into their background and are solely noticeable by the border round them.


Creating regular name to motion buttons in WordPress is sort of simple. You’ll be able to even add them your posts and pages with out writing CSS or HTML. Since ghost buttons are a brand new pattern, there aren’t any particular plugins to create simply buttons within the ghost model.

Including Ghost Buttons in WordPress

As talked about earlier, you’ll need to make use of a tiny little bit of CSS and HTML so as to add ghost buttons in your WordPress theme.

First it’s essential to do is add the next CSS code to your theme or little one theme’s stylesheet.

You have to an FTP client to connect with your net server. As soon as related, go to /wp-content/themes/Your-Theme/ folder and find the model.css file. Open this file to edit in a textual content editor after which paste this code snippet on the backside of the file. (Be taught extra about pasting code snippets from the online in WordPress).




















.ghost-button {

  show: inline-block;

  width: 200px;

  padding: 8px;

  coloration: #fff;

  border: 2px strong #fff;

  text-align: heart;

  define: none;

  text-decoration: none;

  transition: background-color 0.2s ease-out,

              coloration 0.2s ease-out;



.ghost-button:energetic {

  background-color: #fff;

  coloration: #000;

  transition: background-color 0.3s ease-in,

              coloration 0.3s ease-in;


Save your adjustments and add the file again to the server.

Now everytime you wish to show the button all it’s essential to do is add class=”ghost-button”.

For instance, if you wish to add a obtain hyperlink, then create your obtain hyperlink such as you would usually do. Subsequent, swap to the Textual content editor to see the HTML formatting.

Find the HTML code on your obtain hyperlink and add the CSS class like this:

Obtain Now

Save or replace your put up after which preview it. You will note a ravishing ghost button as an alternative of plain previous hyperlink.

We hope this text helped you discover ways to add ghost button in your WordPress theme. You may additionally wish to see our information on find out how to add buttons in WordPress with out utilizing shortcodes

gp-9646812 as-2892278

WP Saviour

I am a WordPress specialist. My mission is to help you create beautiful websites with ease!