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
<form action="/"> | |
<legend>A Sample Form Legend</legend> | |
<label for="name">Name: </label> | |
<input type="text" value="Name" name="Name" /> | |
<label for="email">Email: </label> | |
<input type="email" value="Email" name="Email" /> |
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
// Settings | |
var wrapper = '.testimonials'; // the element wrapping the rotator | |
var child = 'blockquote'; // the element to be rotated | |
// Rotate Script | |
$(wrapper).each( function() { | |
$(this).append('<a href="#" class="next button inner">Next Testimonial</a>'); | |
$(this).find(child).each( function() { |
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 | |
// Add to functions.php | |
function custom_image_sizes() { | |
add_theme_support('post-thumbnails'); | |
add_image_size('banner', 960, 355, true); | |
add_image_size('thumb', 120, 120, true); | |
add_image_size('widget', 170, 400, false); | |
} |
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 | |
// functions.php | |
add_filter( 'wpseo_use_page_analysis', '__return_false' ); |
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
$('.carousel').carousel({ | |
slide: 'img', | |
speed: 5000, | |
transition: 'fade', // 'fade', 'slide' | |
transitionSpeed: 2000, | |
easing: 'ease', // 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear' | |
firstSlide: 1, | |
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 | |
$gallery = get_children( 'posts_per_page=5&post_type=attachment&post_mime_type=image&post_parent=' . $post->ID ); | |
$attr = array( | |
'class' => "attachment-$size wp-post-image", | |
); | |
foreach( $gallery as $image ) { | |
echo '<a href="' . wp_get_attachment_url($image->ID) . '" rel="gallery-' . get_the_ID() . '">'; | |
echo wp_get_attachment_image($image->ID, 'thumbnail', false, $attr); | |
echo '</a>'; | |
} |
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
angular.module('app', []).directive('ngDebounce', function($timeout) { | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
priority: 99, | |
link: function(scope, elm, attr, ngModelCtrl) { | |
if (attr.type === 'radio' || attr.type === 'checkbox') return; | |
elm.unbind('input'); | |
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 | |
// List subpages on parent and child page. Outputs ul > li. | |
$child_of = ($post->post_parent > 0) ? $post->post_parent : $post->ID; | |
if ($child_of > 0 && is_page()) { | |
wp_list_pages('title_li=&child_of='.$child_of); | |
} |
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 | |
/* | |
Based on the original CSS-Tricks code (http://css-tricks.com/snippets/wordpress/get-the-first-image-from-a-post/) | |
## Usage | |
Include in functions.php | |
<?php echo get_first_image('thumbnail'); ?> |
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 | |
/* | |
Plugin Name: Bulk Attachment Resize | |
Description: Destructive operations on DB to replace full images with their resized version. | |
Author: Agency | |
Version: 1.0.0 | |
Author URI: http://agency.sc | |
*/ |
OlderNewer