Skip to content

Instantly share code, notes, and snippets.

@rcstr
Created November 30, 2012 14:07
Show Gist options
  • Save rcstr/4175937 to your computer and use it in GitHub Desktop.
Save rcstr/4175937 to your computer and use it in GitHub Desktop.
setCustomValidity example
passwordVerifyInput.change(function () {
if (passwordVerifyInput.val() == passwordInput.val()) {
passwordVerifyInput[0].setCustomValidity('');
} else {
passwordVerifyInput[0].setCustomValidity('Passwords Do Not Match');
}
});
<?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