Custom Download Button
Add on functions.php (preferably on a child theme)
function dlbutton( $atts, $content = null ) {
extract(shortcode_atts(array(
"id" => '',
"href" => '',
"title" => '',
"style" => '',
"text" => ''
), $atts));
return '<a class="dlbutton" id="'.$id.'" href="'.$href.'" title="'.$title.'" style="'.$style.'">' . $text . '</a>';
}
add_shortcode('dlbutton', 'dlbutton');
CSS Style
.dlbutton {
display: table;
background-color: #FFDA25;
border: 1px solid #444;
border-radius: 3px;
box-shadow: 0 0 2px #000;
margin: 8px;
padding: 6px 8px;
line-height: 1;
font-family: tahoma, sans-serif;
}
.dlbutton:hover {
background-color: #F8FF03;
box-shadow: 1px 1px 2px #000;
}
How to Use on Posts
[dlbutton href="url or location of file" title="Title on Hover" text="Button Name"]