Skip to content

Instantly share code, notes, and snippets.

@jjeaton
jjeaton / .gitignore
Created August 5, 2015 01:54
WordPress root .gitignore. Ignore everything and then opt-in (exclude from the ignore) for your custom code.
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@nathanrice
nathanrice / style.css
Created May 28, 2015 16:34
Style new Genesis Accessibility output
/* ## Screen reader text
--------------------------------------------- */
.screen-reader-text,
.screen-reader-text span,
.screen-reader-shortcut {
position: absolute !important;
clip: rect(0, 0, 0, 0);
height: 1px;
width: 1px;
@nathanrice
nathanrice / functions.php
Created May 28, 2015 16:33
Enable Genesis Accessibility
//* Add Accessibility support
add_theme_support( 'genesis-accessibility', array( 'headings', 'drop-down-menu', 'search-form', 'skip-links' ) );
@markjaquith
markjaquith / nginx.conf
Last active December 25, 2022 15:55
My WordPress Nginx setup
upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
}
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
}
# SSL
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@BrianBourn
BrianBourn / functions-2.php
Last active August 29, 2015 14:02
Dealing with Genesis Simple Sidebars
<?php
//***Add Simple Sidebar Functionality To Author Archives**/
add_action( 'get_header', 'bourncreative_simplesidebars_check' );
function bourncreative_simplesidebars_check() {
if ( function_exists( 'ss_sidebars_init' ) && is_active_sidebar( 'caterina-rando-sidebar' ) ) {
remove_action( 'genesis_sidebar_alt', 'ss_do_sidebar_alt' ); // Unhook Genesis Simple Sidebars
add_action( 'genesis_sidebar_alt', 'bourncreative_author_sidebar_alt' ); // Add Back Custom Sidebar Created With Simple Sidebars
function bourncreative_author_sidebar_alt() {
dynamic_sidebar( 'caterina-rando-sidebar' );
@hissy
hissy / nav-menu-exporter-importer.php
Last active August 13, 2023 17:06
[WordPress Plugin] Nav Menu Exporter and Importer / Export and Import nav menus. Requires WordPress Importer plugin.
<?php
/*
Plugin Name: Nav Menu Exporter and Importer
Description: Export and Import nav menus. Requires WordPress Importer plugin
Author: hissy, megumi themes
Version: 0.1
Text Domain: nav-menu-exporter-importer
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
@norcross
norcross / nocache-css.php
Created August 10, 2013 22:05
simple CSS load
<?php
function rkv_cacheless_css() {
wp_enqueue_style( 'MY-CSS-NAME', MY-CSS-FILE.CSS, array(), time(), 'all' );
}
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
<?php
/**
* Disable Inactive Plugins Nag on Synthesis
*
* @since 1.0.0
*/
function ea_disable_inactive_plugins_nag() {
$disable = get_option( 'synthesis-plugin-snapshots-disable' );
if ( ! $disable )
@robneu
robneu / genesis-cache-busting.php
Last active December 17, 2015 23:08
Make cache busting easier in Genesis by enqueueing a genesis child theme stylesheet with the child theme version appended.
<?php
// Remove the default Genesis child theme CSS
remove_action( 'genesis_meta', 'genesis_load_stylesheet' );
add_action( 'wp_enqueue_scripts', 'prefix_load_stylesheet' );
/**
* Get the current child theme version
* and use it to bust the cache by appending
* it to the CSS output.
*
* @author FAT Media