##Gravity Form "placeholder" transition.
Uses labels as placeholders.
- Fields must be required.
- Labels must be placed behind the text inputs
Put this helper function your functions.php file and pass in an argument (or don't). This way you're alt attribute is always filled out for every image on your site.
This checks to see if the alt attribute is assigned in the WordPress media library and returns that or it just returns the name of the site.
Tip: Use Advanced Custom Fields for the alt attribute.
The reset for bootstrap, so I don't have to keep recreating it every single time.
/* Container used for styling the custom select, the buttom class below adds the | |
* bg gradient, corners, etc. */ | |
.custom-select { | |
position: relative; | |
display: block; | |
select { | |
width: 100%; | |
margin: 0; | |
height: 50px; | |
border: 1px solid #CCC; |
<?php | |
$category_id = htmlspecialchars($_GET['cat']); | |
if( !empty($category_id) ){ | |
$args = array( | |
'posts_per_page' => -1, | |
'post_type' => 'testimonials', | |
'orderby' => 'menu_order', | |
'order' => 'ASC', | |
'post_status' => 'publish', | |
'tax_query' => array( |
@light-blue : #02a0df; | |
@black : #000; | |
.button( @color: @light-blue ) { .btn; border-radius: 0px; background-color: @color; color: #FFF; font-size: 16px; font-weight: bold; line-height: 28px; letter-spacing: .02em; text-transform: uppercase; padding: 6px 61px; .transition(background-color .4s ease); | |
&:hover, &:active, &:focus { background-color: darken(@light-blue, 10%); color: white; } | |
} | |
/* | |
* Labels and input on the same line with inline checkboxes and radios |
.carousel-fade { | |
.carousel-inner { | |
.item { opacity:0; .transition-property(opacity); } | |
.active { opacity:1; } | |
.active.left, | |
.active.right { left:0; opacity:0; z-index:1; } | |
.next.left, | |
.prev.right { opacity:1; } | |
} | |
.carousel-control { z-index:2; text-shadow: none; } |