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 | |
// WP_Query Arguments | |
$args = array( | |
'order' => 'DESC', | |
'posts_per_page' => 5 | |
); | |
// The Loop | |
$query = new WP_Query( $args ); |
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
add_action( 'wp_footer', 'wds_debug' ); | |
/* | |
* Show me some dev info during development! DELETE ME BEFORE GOING LIVE!!! | |
* | |
*/ | |
function wds_debug() { | |
global $template; ?><br /> | |
<?php echo $template; ?><br /> | |
<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds<br /> | |
Server load: <?php $load = sys_getloadavg(); echo $load[0]; ?>%<br /> |
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 | |
// DO NOT INCLUDE OPENING PHP TAG | |
add_filter( 'img_caption_shortcode', 'custom_remove_additional_10px_from_captions', 10, 3 ); | |
/** | |
* Prevent Wordpress from inserting an extra 10px of width to image caption shortcodes. | |
*/ | |
function custom_remove_additional_10px_from_captions( $val, $attr, $content = null ) { | |
extract( shortcode_atts( array( |
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 // do not include leading php tag | |
/** | |
* For developers: WordPress debugging mode. | |
* | |
* Change this to true to enable the display of notices during development. | |
* It is strongly recommended that plugin and theme developers use WP_DEBUG | |
* in their development environments. | |
*/ | |
define('WP_DEBUG', true); |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php | |
/** | |
* Remove emoji support. | |
*/ | |
function grd_remove_emoji() { | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); |
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
// Create an object in the global scope, pass in window, jQuery, and the global object into the anonymous function. | |
window.myObject = ( function( window, $, myObject ) { | |
// Create our object, properties, and functions. | |
myObject = { | |
window: $( window ), // Remove if you don't need it, makes your object smaller. | |
// Access variables using myObject.options | |
options { |
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
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="robots" content="noodp, noydir" /> | |
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com"> | |
<link rel="canonical" href="http://mysite.com/" /> | |
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" /> |
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
/** | |
* file: wdsjQuery.js | |
* | |
* Handle Foo things for the foo theme. | |
*/ | |
window.wdsFoo = {}; | |
( function( window, $, app ) { | |
// Private variable. | |
var fooVariable = 'foo'; |
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
/* Reset | |
------------------------------------------------------------ */ | |
body#ttrssMain, | |
body#ttrssPrefs, | |
body#ttrssLogin, | |
body { | |
color: #000; | |
font-family: "Arial", sans-serif; | |
font-size: 100%; /* Set to default browser size, 16px */ | |
line-height: 1.5; |