A Pen by Kael Steinert on CodePen.
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Single-Column Responsive Email Template</title> | |
<style> | |
@media only screen and (min-device-width: 541px) { | |
.content { |
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 | |
$sfidsearch = get_query_var( 'sfid'); | |
$catsearch = get_query_var( '_sft_category'); | |
$sfsearch = get_query_var( 's'); | |
?> | |
<?php echo do_shortcode('[ajax_load_more post_type="post" offset="6" posts_per_page="6" max_pages="0" button_label="Load More" category="' . $catsearch .'" search="' . $sfsearch .'"]'); ?> |
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 header('X-Frame-Options: GOFORIT'); ?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>SpeedTester</title> | |
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, minimal-ui"> | |
<style type="text/css"> | |
* { box-sizing: border-box; -moz-box-sizing: border-box; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-kerning: auto; font-family: 'Source Sans Pro', 'Open Sans', Roboto, 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', 'Myriad Pro', 'Segoe UI', Myriad, Helvetica, 'Lucida Grande', 'DejaVu Sans Condensed', 'Liberation Sans', 'Nimbus Sans L', Tahoma, Geneva, Arial, sans-serif; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; cursor: default; } | |
html { font-size: 10pt; background: #ccc; -webkit-text-size-adjust: 100%; } |
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 | |
/** | |
* The template for displaying all single posts. | |
* | |
* @package theme_name | |
*/ | |
get_header(); ?> | |
<!-- Option #1 - Default way of calling the "Full" Featured image size and placing it inside a div that would be 100% wide on screen. --> |
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
***Imagine the WordPress site you've been working on is now unexpectedly displaying a blank/white screen. Walk us through the steps you'd take to troubleshoot this problem.*** | |
#1. Assuming that I'm already working on the site, remove previously written code to see if it's the culprit. | |
#2. Check previously written code for errors. White/blank screen if often the result of a php error. | |
#3. Check to see if blank/white screen is affecting entire site or single page. (Including logged in/out states) | |
#3.1 If affecting single page - Check page template for errors/conflicts | |
#3.2 If affecting whole site - check the themes functions.php file for errors/conflicts | |
#4. Test on a minumum of one other machine to determine if problem is only happening to a single machine. | |
#5. Check site caches to see if it's either creating the problem or simply cached the problem at the wrong time. | |
#6. Consider the hosting situation and see if the memory allocated to the domain is exhausted |
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 | |
/* ---------------------------------------------------------- | |
* ---------------------------------------------------------- | |
Featured Grid Dashboard Widget | |
------------------------------------------------------------- * | |
------------------------------------------------------------- */ | |
/** | |
* Add a widget to the dashboard. | |
*/ |
This is a collection of my most often used lines of code, as well as a few other examples I want to have ready at a moment's notice. These snippets focus on building HTML from scratch, linking in good web fonts, and setting up responsive styles for your pages.
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 | |
/** | |
* For developers: WordPress debugging mode. | |
* | |
* If the default WP_DEBUG function is set to false and | |
* there are still warnings or errors showing up, try | |
* using the following instead | |
*/ | |
ini_set('log_errors','On'); | |
ini_set('display_errors','Off'); |
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 | |
// Redirect ALL urls to another domain | |
if (isset($_SERVER['PANTHEON_ENVIRONMENT']) && | |
($_SERVER['PANTHEON_ENVIRONMENT'] === 'live') && | |
(php_sapi_name() != "cli")) { | |
$newurl = 'http://www.jfrohrbaugh.com/'. $_SERVER['REQUEST_URI']; | |
header('HTTP/1.0 301 Moved Permanently'); | |
header("Location: $newurl"); | |
exit(); | |
} |
OlderNewer