This file contains 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
http://wordpress.org/support/topic/how-to-add-four-wp-queries-without-duplicate-posts | |
query for loop1 | |
loop1: | |
$do_not_duplicate[] = $post->ID; | |
end loop1; | |
query for loop2 including 'post__not_in => $do_not_duplicate' | |
loop2: | |
$do_not_duplicate[] = $post->ID; |
This file contains 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
var twitter_api_url = 'http://search.twitter.com/search.json'; | |
var twitter_user = 'onebeatchannel'; | |
$.ajaxSetup({ | |
cache: true | |
}); | |
$.getJSON( | |
twitter_api_url + '?callback=?&rpp=3&q=from:' + twitter_user, |
This file contains 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 | |
//grabbed from image.php in TwentyTwelve...credit where credit's due | |
/** | |
* Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, | |
* or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file | |
*/ | |
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); | |
foreach ( $attachments as $k => $attachment ) : | |
if ( $attachment->ID == $post->ID ) |
This file contains 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
jQuery(document).ready(function() { | |
jQuery('a.maxbutton-1').attr( 'onClick', 'return false' ); | |
}); |
This file contains 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
// into template or another filter i suppose | |
$pattern = get_shortcode_regex(); | |
if( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches ) | |
&& array_key_exists( 2, $matches ) | |
&& in_array( 'gallery', $matches[2] ) ): | |
$keys = array_keys( $matches[2], 'gallery' ); |
This file contains 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 | |
require("share-count.php"); | |
// grab current url by site, then inner page | |
$url = site_url() . $_SERVER['REQUEST_URI']; | |
// get page title and sanitize | |
$title = get_the_title(); | |
$clean_title = str_replace(' ', '%20', $title); |
This file contains 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
const cards = [ | |
'A', | |
'K', | |
'Q', | |
'J', | |
'10', | |
'9', | |
]; |
OlderNewer