Skip to content

Instantly share code, notes, and snippets.

View craigsimps's full-sized avatar

Craig Simpson craigsimps

View GitHub Profile
@nathanrice
nathanrice / functions.php
Created August 31, 2015 14:59
Remove entry meta for post types
<?php
add_action( 'init', 'sample_remove_entry_meta', 11 );
/**
* Remove entry meta for post types
*
* @link https://gist.github.com/nathanrice/03a5871e5e5a27f22747
*/
function sample_remove_entry_meta() {
remove_post_type_support( 'post-type', 'genesis-entry-meta-before-content' );
@tomjn
tomjn / behave.js
Last active April 17, 2018 19:45
Adds a shortcode to WordPress that lets you test escaping and sanitising functions on content
/*
* Behave.js
*
* Copyright 2013, Jacob Kelley - http://jakiestfu.com/
* Released under the MIT Licence
* http://opensource.org/licenses/MIT
*
* Github: http://github.com/jakiestfu/Behave.js/
* Version: 1.5
*/
@bryanwillis
bryanwillis / bootstrap-genesis-structural-wraps.php
Last active October 5, 2020 18:16
Adding genesis-structural-wrap-support to Bootstrap Genesis
<?php
/**
* Module: Bootstrap Genesis Plugin - Structural Wraps
* Author: Bryan Willis
*/
/**
* Add theme support for structural wraps
*/
function gb3_add_theme_support_structural_wraps() {
@dobbyloo
dobbyloo / AssetRegister.php
Created March 4, 2014 21:56
Wordpress: wrapper class to register/enqueue styles and scripts in a theme.
<?php namespace PaintedCloud\WP\Classes;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class AssetRegister {
public $scripts_base_uri;
public $styles_base_uri;
protected $scripts;
protected $stylesheets;
@JiveDig
JiveDig / facetwp-pagination-genesis-markup.php
Last active September 24, 2021 18:54
Adjust FacetWP's pager html to match Genesis markup. This allows it to inherit the Genesis theme styles. Used with [facetwp pager="true"]
<?php
/**
* Style pagination to look like Genesis.
*
* @version 1.0.0
*
* @author Mike Hemberger @JiveDig
*
* @link https://gist.github.com/JiveDig/b9810ba4c322d7757993159ed9ccb61f
@jeffgolenski
jeffgolenski / WordPress Comment Styling SCSS
Last active October 19, 2022 14:25
SCSS WordPress Comment Styles. Based on the WordPress threaded comments CSS over at css-tricks.com, I created this nested SCSS. It's basic, simple, and clean. Quickly copy, paste, and style away! Original CSS located at: http://css-tricks.com/snippets/wordpress/base-threaded-comments-styling/
/* =========================================================
Comments
========================================================= */
ol.commentlist {
list-style:none;
margin:0 0 1em;
padding:0;
text-indent:0;
@jdevalk
jdevalk / .htaccess
Last active November 28, 2023 20:28
These three files together form an affiliate link redirect script.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
</IfModule>
@johnbillion
johnbillion / wp_mail.md
Last active June 3, 2024 13:31
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@laverboy
laverboy / LogUse.php
Last active June 4, 2024 06:56
A simple, static, logging singleton class
<?php
Log::info("something really interesting happened", ['extra' => 'information', 'about' => 'anything' ]);
@Rarst
Rarst / WordPress.xml
Last active September 5, 2024 01:49
WordPress Live Templates for PhpStorm
<?xml version="1.0" encoding="UTF-8"?>
<templateSet group="WordPress">
<template name="aa" value="add_action( '$hook$', '$callback$' );&#10;$END$" description="add_action" toReformat="false" toShortenFQNames="true">
<variable name="hook" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="callback" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="false" />
<option name="HTML" value="false" />
<option name="XSL_TEXT" value="false" />
<option name="XML" value="false" />