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> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
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
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
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
/* Basic two stop gradient */ | |
.example-gradient { | |
.linear-gradient(150deg, #eee, #aaa); | |
} | |
/* Outputs */ | |
.example-gradient { | |
background: -webkit-linear-gradient(150deg, #EEE 0%, #AAA 100%); | |
background: -moz-linear-gradient(150deg, #EEE 0%, #AAA 100%); | |
background: -ms-linear-gradient(150deg, #EEE 0%, #AAA 100%); | |
background: -o-linear-gradient(150deg, #EEE 0%, #AAA 100%); |
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 | |
/* Template Name: Test */ | |
/** | |
* Genesis custom loop | |
*/ | |
function be_custom_loop() { | |
global $post; | |
// arguments, adjust as needed |
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
/** Customize Read More Text */ | |
add_filter( 'excerpt_more', 'child_read_more_link' ); | |
add_filter( 'get_the_content_more_link', 'child_read_more_link' ); | |
add_filter( 'the_content_more_link', 'child_read_more_link' ); | |
function child_read_more_link() { | |
return '<a href="' . get_permalink() . '" rel="nofollow">CUSTOMIZE YOUR TEXT HERE</a>'; | |
} |
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
/** | |
* Breaks the posts into 4 columns | |
* @link http://www.billerickson.net/code/grid-loop-using-post-class | |
*/ | |
add_filter( 'post_class', 'tsm_archive_post_class' ); | |
function tsm_archive_post_class( $classes ) { | |
global $wp_query; | |
// Keeps columns out of secondary loops ie: Genesis Featured Post widgets | |
if( ! $wp_query->is_main_query() ) { | |
return $classes; |
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
/* Column Classes | |
Link: Link: http://wpsmith.net/2013/wp/genesis-2-0-drops-fifths-from-column-classes/ | |
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css | |
--------------------------------------------- */ | |
.five-sixths, | |
.four-sixths, | |
.four-fifths, | |
.one-fifth, | |
.one-fourth, |
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_filter('the_content_feed', 'wpsitesdotnet_post_thumbnail_rss'); | |
add_filter('the_excerpt_rss', 'wpsitesdotnet_post_thumbnail_rss'); | |
function wpsitesdotnet_post_thumbnail_rss($content) { | |
global $post; | |
if ( has_post_thumbnail( $post->ID ) ){ | |
$content = '' . get_the_post_thumbnail( $post->ID, 'featured-img', array( 'style' => 'align:centre; margin-bottom:40px; height: 300px; width: 600px;' ) ) . '' . $content; | |
} | |
return $content; | |
} |
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 copy opening php tag | |
// Force Stupid IE to NOT use compatibility mode | |
add_filter( 'wp_headers', 'wsm_keep_ie_modern' ); | |
function wsm_keep_ie_modern( $headers ) { | |
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) ) { | |
$headers['X-UA-Compatible'] = 'IE=edge,chrome=1'; | |
} | |
return $headers; |
OlderNewer