Skip to content

Instantly share code, notes, and snippets.

@ocean90
ocean90 / box-shadow.html
Last active April 11, 2024 13:54
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// 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
*/
@kellec
kellec / examples-and-output.css
Created April 12, 2012 02:10
a LESS mixin for versatile gradients (with IE support)
/* 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%);
@billerickson
billerickson / genesis-custom-loop-pagination.php
Created July 31, 2012 15:59
Genesis custom loop with pagination
<?php
/* Template Name: Test */
/**
* Genesis custom loop
*/
function be_custom_loop() {
global $post;
// arguments, adjust as needed
@grtaylor2
grtaylor2 / Change Read More Text Genesis WordPress
Last active August 11, 2021 19:53
Change the [Read More] Text in Genesis WordPress Child Theme
/** 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>';
}
@JiveDig
JiveDig / post_class_columns.php
Last active June 11, 2016 00:06
Use post_class (post class) to break post into columns Last example shows how to conditionally use post class, for specific templates or pages
/**
* 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;
/**
* @author Brad Dalton WP Sites
* @link http://wpsites.net/blog
*/
add_action( 'genesis_after_post_content', 'custom_post_type_nav', 5 );
function custom_post_type_nav() {
if( 'portfolio' == get_post_type() && is_single() )
return;
@wpsmith
wpsmith / column-classes.css
Last active October 11, 2017 19:02
CSS: Genesis Column Classes including fifths
/* 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,
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;
}
@ChrisCree
ChrisCree / functions.php
Last active October 19, 2017 20:26
Force IE not to use so-called "compatibility" mode in the Genesis theme framework.
<?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;