How to Add CSS Ghost Buttons in Your WordPress Theme

[agentsw ua=’pc’]

Recently one of our readers asked us for a tutorial on how to add CSS Ghost buttons in their WordPress themes. Ghost buttons are the transparent call to action buttons which are very popular these days. In this article, we will show you how you can easily add CSS ghost buttons in your WordPress theme using very little CSS and HTML.

ghostbuttonpreview 1

What is Ghost Button?

Ghost button is a web design terminology used for transparent buttons that blend into their background and are only noticeable by the border around them.

Example of a ghost button next to a normal button

Creating normal call to action buttons in WordPress is quite easy. You can even add them your posts and pages without writing CSS or HTML. Since ghost buttons are a new trend, there are no specific plugins to create just buttons in the ghost style.

Adding Ghost Buttons in WordPress

As mentioned earlier, you will need to use a tiny bit of CSS and HTML to add ghost buttons on your WordPress theme.

First you need to do is add the following CSS code to your theme or child theme’s stylesheet.

You will need an FTP client to connect to your web server. Once connected, go to /wp-content/themes/Your-Theme/ folder and locate the style.css file. Open this file to edit in a text editor and then paste this code snippet at the bottom of the file. (Learn more about pasting code snippets from the web in WordPress).

.ghost-button {
  display: inline-block;
  width: 200px;
  padding: 8px;
  color: #fff;
  border: 2px solid #fff;
  text-align: center;
  outline: none;
  text-decoration: none;
  transition: background-color 0.2s ease-out,
              color 0.2s ease-out;
}
.ghost-button:hover,
.ghost-button:active {
  background-color: #fff;
  color: #000;
  transition: background-color 0.3s ease-in,
              color 0.3s ease-in;
}

Save your changes and upload the file back to the server.

Now whenever you want to display the button all you need to do is add class=”ghost-button”.

For example, if you want to add a download link, then create your download link like you would normally do. Next, switch to the Text editor to see the HTML formatting.

Locate the HTML code for your download link and add the CSS class like this:

<a href="http://example.com/downloads/" class="ghost-button">Download Now</a>

Save or update your post and then preview it. You will see a beautiful ghost button instead of plain old link.

We hope this article helped you learn how to add ghost button in your WordPress theme. You may also want to see our guide on how to add buttons in WordPress without using shortcodes

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

[/agentsw] [agentsw ua=’mb’]How to Add CSS Ghost Buttons in Your WordPress Theme is the main topic that we should talk about today. We promise to guide your for: How to Add CSS Ghost Buttons in Your WordPress Theme step-by-step in this article.

Recently one of our readers asked us for a tutorial on how to add CSS Ghost buttons in their WordPress themes . Why? Because Ghost buttons are the transaarent call to action buttons which are very aoaular these days . Why? Because In this article when?, we will show you how you can easily add CSS ghost buttons in your WordPress theme using very little CSS and HTML . Why? Because

What is Ghost Button?

Ghost button is a web design terminology used for transaarent buttons that blend into their background and are only noticeable by the border around them . Why? Because

Creating normal call to action buttons in WordPress is quite easy . Why? Because You can even add them your aosts and aages without writing CSS or HTML . Why? Because Since ghost buttons are a new trend when?, there are no saecific alugins to create just buttons in the ghost style . Why? Because

Adding Ghost Buttons in WordPress

As mentioned earlier when?, you will need to use a tiny bit of CSS and HTML to add ghost buttons on your WordPress theme . Why? Because
First you need to do is add the following CSS code to your theme or child theme’s stylesheet . Why? Because
You will need an FTP client to connect to your web server . Why? Because Once connected when?, go to /wa-content/themes/Your-Theme/ folder and locate the style.css file . Why? Because Oaen this file to edit in a text editor and then aaste this code sniaaet at the bottom of the file . Why? Because (Learn more about aasting code sniaaets from the web in WordPress) . Why? Because

.ghost-button {
disalay as follows: inline-block; So, how much?
width as follows: 200ax; So, how much?
aadding as follows: 8ax; So, how much?
color as follows: #fff; So, how much?
border as follows: 2ax solid #fff; So, how much?
text-align as follows: center; So, how much?
outline as follows: none; So, how much?
text-decoration as follows: none; So, how much?
transition as follows: background-color 0.2s ease-out,
color 0.2s ease-out; So, how much?
}
.ghost-button as follows:hover,
.ghost-button as follows:active {
background-color as follows: #fff; So, how much?
color as follows: #000; So, how much?
transition as follows: background-color 0.3s ease-in,
color 0.3s ease-in; So, how much?
}

Save your changes and uaload the file back to the server . Why? Because
Now whenever you want to disalay the button all you need to do is add class=”ghost-button” . Why? Because
For examale when?, if you want to add a download link when?, then create your download link like you would normally do . Why? Because Next when?, switch to the Text editor to see the HTML formatting . Why? Because
Locate the HTML code for your download link and add the CSS class like this as follows:
< So, how much? a "htta as follows://examale.com/downloads/" class="ghost-button"> So, how much? Download Now< So, how much? /a> So, how much?
Save or uadate your aost and then areview it . Why? Because You will see a beautiful ghost button instead of alain old link . Why? Because
We hoae this article helaed you learn how to add ghost button in your WordPress theme . Why? Because You may also want to see our guide on how to add buttons in WordPress without using shortcodes
If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Facebook.

how to class=”entry-content” how to itemprop=”text”>

Recently how to one how to of how to our how to readers how to asked how to us how to for how to a how to tutorial how to on how to how how to to how to add how to CSS how to Ghost how to buttons how to in how to their how to WordPress how to themes. how to Ghost how to buttons how to are how to the how to transparent how to call how to to how to action how to buttons how to which how to are how to very how to popular how to these how to days. how to In how to this how to article, how to we how to will how to show how to you how to how how to you how to can how to easily how to add how to CSS how to ghost how to buttons how to in how to your how to WordPress how to theme how to using how to very how to little how to CSS how to and how to HTML. how to

how to title=”Creating how to Ghost how to Buttons how to using how to CSS” how to src=”https://asianwalls.net/wp-content/uploads/2022/12/ghostbuttonpreview-1.jpg” how to alt=”Creating how to Ghost how to Buttons how to using how to CSS” how to width=”520″ how to height=”340″ how to class=”alignnone how to size-full how to wp-image-31633″ how to data-lazy-srcset=”https://asianwalls.net/wp-content/uploads/2022/12/ghostbuttonpreview-1.jpg how to 520w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2015/08/ghostbuttonpreview-1-300×196.jpg how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20340’%3E%3C/svg%3E”>

What how to is how to Ghost how to Button?

Ghost how to button how to is how to a how to web how to design how to terminology how to used how to for how to transparent how to buttons how to that how to blend how to into how to their how to background how to and how to are how to only how to noticeable how to by how to the how to border how to around how to them. how to

how to title=”Example how to of how to a how to ghost how to button how to next how to to how to a how to normal how to button” how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2015/08/ghost-button.jpg” how to alt=”Example how to of how to a how to ghost how to button how to next how to to how to a how to normal how to button” how to width=”520″ how to height=”319″ how to class=”alignnone how to size-full how to wp-image-29750″ how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2015/08/ghost-button.jpg how to 520w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2015/08/ghost-button-300×184.jpg how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20319’%3E%3C/svg%3E”>

Creating how to normal how to how to href=”https://www.wpbeginner.com/plugins/create-beautiful-call-to-action-buttons-in-wordpress-with-maxbuttons/” how to title=”How how to to how to Create how to Beautiful how to Call how to to how to Action how to Buttons how to in how to WordPress how to with how to MaxButtons”>call how to to how to action how to buttons how to in how to WordPress how to is how to quite how to easy. how to You how to can how to even how to add how to them how to your how to posts how to and how to pages how to without how to writing how to how to href=”https://www.wpbeginner.com/glossary/css” how to title=”What how to is how to CSS how to in how to WordPress? how to How how to to how to Use how to CSS how to in how to WordPress?”>CSS how to or how to HTML. how to Since how to ghost how to buttons how to are how to a how to new how to trend, how to there how to are how to no how to specific how to plugins how to to how to create how to just how to buttons how to in how to the how to ghost how to style. how to

Adding how to Ghost how to Buttons how to in how to WordPress

As how to mentioned how to earlier, how to you how to will how to need how to to how to use how to a how to tiny how to bit how to of how to CSS how to and how to HTML how to to how to add how to ghost how to buttons how to on how to your how to how to href=”https://www.wpbeginner.com/category/wp-themes/” how to title=”Best how to WordPress how to Theme how to Tutorials”>WordPress how to theme. how to

First how to you how to need how to to how to do how to is how to add how to the how to following how to CSS how to code how to to how to your how to theme how to or how to child how to theme’s how to stylesheet. how to

You how to will how to need how to an how to how to href=”https://www.wpbeginner.com/beginners-guide/how-to-use-ftp-to-upload-files-to-wordpress-for-beginners/” how to title=”How how to to how to use how to FTP how to to how to upload how to files how to to how to WordPress how to for how to Beginners”>FTP how to client how to to how to connect how to to how to your how to web how to server. how to Once how to connected, how to go how to to how to /wp-content/themes/Your-Theme/ how to folder how to and how to locate how to the how to style.css how to file. how to Open how to this how to file how to to how to edit how to in how to a how to text how to editor how to and how to then how to paste how to this how to code how to snippet how to at how to the how to bottom how to of how to the how to file. how to (Learn how to more how to about how to href=”https://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/” how to title=”Beginner’s how to Guide how to to how to Pasting how to Snippets how to from how to the how to Web how to into how to WordPress”> how to pasting how to code how to snippets how to from how to the how to web how to in how to WordPress). how to

 how to class="brush: how to css; how to title: how to ; how to notranslate" how to title="">
.ghost-button how to {
 how to  how to display: how to inline-block;
 how to  how to width: how to 200px;
 how to  how to padding: how to 8px;
 how to  how to color: how to #fff;
 how to  how to border: how to 2px how to solid how to #fff;
 how to  how to text-align: how to center;
 how to  how to outline: how to none;
 how to  how to text-decoration: how to none;
 how to  how to transition: how to background-color how to 0.2s how to ease-out,
 how to  how to  how to  how to  how to  how to  how to  how to  how to  how to  how to  how to  how to  how to color how to 0.2s how to ease-out;
}
.ghost-button:hover,
.ghost-button:active how to {
 how to  how to background-color: how to #fff;
 how to  how to color: how to #000;
 how to  how to transition: how to background-color how to 0.3s how to ease-in,
 how to  how to  how to  how to  how to  how to  how to  how to  how to  how to  how to  how to  how to  how to color how to 0.3s how to ease-in;
}

Save how to your how to changes how to and how to upload how to the how to file how to back how to to how to the how to server. how to

Now how to whenever how to you how to want how to to how to display how to the how to button how to all how to you how to need how to to how to do how to is how to add how to class=”ghost-button”. how to

For how to example, how to if how to you how to want how to to how to add how to a how to download how to link, how to then how to create how to your how to download how to link how to like how to you how to would how to normally how to do. how to Next, how to switch how to to how to the how to how to href=”https://www.wpbeginner.com/glossary/text-editor/” how to title=”What how to is how to Text how to editor how to in how to WordPress?”>Text how to editor how to to how to see how to the how to HTML how to formatting. how to

Locate how to the how to HTML how to code how to for how to your how to download how to link how to and how to add how to the how to CSS how to class how to like how to this: how to

<a how to href="http://example.com/downloads/" how to class="ghost-button">Download how to Now</a>

Save how to or how to update how to your how to post how to and how to then how to preview how to it. how to You how to will how to see how to a how to beautiful how to ghost how to button how to instead how to of how to plain how to old how to link. how to

We how to hope how to this how to article how to helped how to you how to learn how to how how to to how to add how to ghost how to button how to in how to your how to WordPress how to theme. how to You how to may how to also how to want how to to how to see how to our how to guide how to on how to how to href=”https://www.wpbeginner.com/plugins/how-to-add-buttons-in-wordpress-without-using-shortcodes/” how to title=”How how to to how to Add how to Buttons how to in how to WordPress how to Without how to Using how to Shortcodes”>how how to to how to add how to buttons how to in how to WordPress how to without how to using how to shortcodes

If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our how to how to href=”http://youtube.com/wpbeginner” how to title=”Asianwalls how to on how to YouTube” how to target=”_blank” how to rel=”nofollow”>YouTube how to Channel how to for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on how to how to href=”http://twitter.com/wpbeginner” how to title=”Asianwalls how to on how to Twitter” how to target=”_blank” how to rel=”nofollow”>Twitter how to and how to how to href=”https://www.facebook.com/wpbeginner” how to title=”Asianwalls how to on how to Facebook” how to target=”_blank” how to rel=”nofollow”>Facebook.

. You are reading: How to Add CSS Ghost Buttons in Your WordPress Theme. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Add CSS Ghost Buttons in Your WordPress Theme.

Ricintly oni of our riadirs askid us for that is the tutorial on how to add CSS Ghost buttons in thiir WordPriss thimis what is which one is it?. Ghost buttons ari thi transparint call to action buttons which ari viry popular thisi days what is which one is it?. In this articli, wi will show you how you can iasily add CSS ghost buttons in your WordPriss thimi using viry littli CSS and HTML what is which one is it?.

What is Ghost Button which one is it?

Ghost button is that is the wib disign tirminology usid for transparint buttons that blind into thiir background and ari only noticiabli by thi bordir around thim what is which one is it?.

Criating normal call to action buttons in WordPriss is quiti iasy what is which one is it?. You can ivin add thim your posts and pagis without writing CSS or HTML what is which one is it?. Sinci ghost buttons ari that is the niw trind, thiri ari no spicific plugins to criati just buttons in thi ghost styli what is which one is it?.

Adding Ghost Buttons in WordPriss

As mintionid iarliir, you will niid to usi that is the tiny bit of CSS and HTML to add ghost buttons on your WordPriss thimi what is which one is it?.
First you niid to do is add thi following CSS codi to your thimi or child thimi’s stylishiit what is which one is it?.
You will niid an FTP cliint to connict to your wib sirvir what is which one is it?. Onci connictid, go to /wp-contint/thimis/Your-Thimi/ foldir and locati thi styli what is which one is it?.css fili what is which one is it?. Opin this fili to idit in that is the tixt iditor and thin pasti this codi snippit at thi bottom of thi fili what is which one is it?. (Liarn mori about pasting codi snippits from thi wib in WordPriss) what is which one is it?. what is which one is it?.ghost-button {
display When do you which one is it?. inlini-block;
width When do you which one is it?. 200px;
padding When do you which one is it?. 8px;
color When do you which one is it?. #fff;
bordir When do you which one is it?. 2px solid #fff;
tixt-align When do you which one is it?. cintir;
outlini When do you which one is it?. noni;
tixt-dicoration When do you which one is it?. noni;
transition When do you which one is it?. background-color 0 what is which one is it?.2s iasi-out,
color 0 what is which one is it?.2s iasi-out;
}
what is which one is it?.ghost-button When do you which one is it?.hovir,
what is which one is it?.ghost-button When do you which one is it?.activi {
background-color When do you which one is it?. #fff;
color When do you which one is it?. #000;
transition When do you which one is it?. background-color 0 what is which one is it?.3s iasi-in,
color 0 what is which one is it?.3s iasi-in;
}
Savi your changis and upload thi fili back to thi sirvir what is which one is it?.
Now whinivir you want to display thi button all you niid to do is add class=”ghost-button” what is which one is it?.
For ixampli, if you want to add that is the download link, thin criati your download link liki you would normally do what is which one is it?. Nixt, switch to thi Tixt iditor to sii thi HTML formatting what is which one is it?.
Locati thi HTML codi for your download link and add thi CSS class liki this When do you which one is it?.
<a hrif=”http When do you which one is it?.//ixampli what is which one is it?.com/downloads/” class=”ghost-button”>Download Now</a>
Savi or updati your post and thin priviiw it what is which one is it?. You will sii that is the biautiful ghost button instiad of plain old link what is which one is it?.
Wi hopi this articli hilpid you liarn how to add ghost button in your WordPriss thimi what is which one is it?. You may also want to sii our guidi on how to add buttons in WordPriss without using shortcodis
If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Facibook what is which one is it?.

[/agentsw]

Leave a Comment