Created
November 30, 2012 14:07
-
-
Save rcstr/4175937 to your computer and use it in GitHub Desktop.
setCustomValidity example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
passwordVerifyInput.change(function () { | |
if (passwordVerifyInput.val() == passwordInput.val()) { | |
passwordVerifyInput[0].setCustomValidity(''); | |
} else { | |
passwordVerifyInput[0].setCustomValidity('Passwords Do Not Match'); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$taldia = get_posts(array( 'category_name' => 'tal-dia-como-hoy', 'numberposts' => 1, 'orderby' => 'post_date', 'post_type' => 'post', )); | |
foreach($taldia as $post) : setup_postdata($post); | |
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'un-dia-como-hoy' ); | |
$image = $image[0]; | |
$image = str_replace(' ', '/', $image); | |
$taldiaprint = '<article id="post-' . get_the_ID() . '" role="article" style="background-image: url("'. $image .'")">'; | |
$taldiaprint .= $taldiaprint . get_the_content() . '</article>'; | |
endforeach; | |
echo $taldiaprint; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment