[TIP]How to add a button in WordPress posts or pages without plugin

To add a button in WordPress posts or pages, you could use available PlugIn. There are lots of plugin to add button in your posts but you will cannot customize buttons follow your style or you have to pay money.

In advantage of WordPress is easy to customize, so how to add a button in WordPress posts or pages without plugin?

The firstly, you need basic about html, CSS, Javascript…

these are steps to add a button in WordPress posts or pages:

Step1: Login to WordPress Admin Page

Step2: Create new post.

Step3: In screen Add New Post, we will select part of Text on Editor.

add button in WordPress posts or pages

 

Step4: At Text editor, we will add html element to create a button.

<a href="javascript:void(0)" target="_blank" onclick="s=prompt('Copy text:','Demo text'); window.open('http://nz-review.com/hawk-host-coupon/'); " class="demo-code">Demo Button</a>

add button in WordPress posts or pages

Step5: Create style for button via css

.entry-content input[type=button], .entry-content .demo-code, .demo-code{
background-color: #669900;
text-align: center;
color: white;
cursor: pointer;
font-weight: bold;
font-size: 20px;
padding: 8px 15px;
display: inline-block;
margin-bottom: 10px;
height: initial;
border-radius: 4px;
}

.demo-code:hover{
background:#507800;
}

add button in WordPress posts or pages

Demo here:

Demo Button

Demo Button

Add Comment