Skip to content

Instantly share code, notes, and snippets.

View christophherr's full-sized avatar

Christoph Herr christophherr

View GitHub Profile
@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
@adamwathan
adamwathan / 1-add-macros.php
Last active June 11, 2022 19:55
Multiformat Endpoints in Laravel
<?php
namespace App\Providers;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
use Illuminate\Support\ServiceProvider;
use App\Http\Middleware\CaptureRequestExtension;
class AppServiceProvider extends ServiceProvider
@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

@salcode
salcode / .gitignore
Last active April 3, 2024 18:38
Please see https://salferrarello.com/wordpress-gitignore/ for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
@nickcernis
nickcernis / functions.php
Created December 4, 2014 10:10
Fix for breadcrumbs appearing on iThemes ghost pages with Genesis themes
<?php // be sure to remove this line!
// Workaround for iThemes Exchange breadcrumbs issue.
// Strip breadcrumbs on iThemes Exchange ghost pages unless
// Genesis settings have enabled breadcrumbs on pages.
add_action( 'genesis_before_content', 'studiopress_it_exchange_breadcrumbs' );
function studiopress_it_exchange_breadcrumbs() {
global $post;
@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;
@norcross
norcross / yoast-ga-menu-move.php
Last active August 29, 2015 14:06
move Yoast Google Analytics top-level nav to a sub menu
/**
* move the main settings page for Yoast Google Analytics
* from it's own parent menu into a submenu page in either
* the Yoast SEO menu or in the general settings
*
* @return null
*/
function rkv_yoast_ga_menu() {
// check for the Yoast GA class in the event the plugin
@robneu
robneu / genesis-nav-space-fix.css
Last active May 21, 2018 20:45
Remove unwated space from nav elements on Genesis themes.
/**
* The Default Genesis styles have a bug which causes extra unwanted
* space to display in the nav menu bar elements. This will remove the
* extra space cross-browser. The reason for the strange .001px font size
* is due to a bug on older Andorid devices.
*
* Note: I've used the default Genesis styles here as an example. The only
* actual change is the font-size rule on both selectors.
*
* Reference link: http://css-tricks.com/fighting-the-space-between-inline-block-elements/
@bradpotter
bradpotter / functions.php
Last active July 18, 2017 08:26
How to Add “Top” and “Footer” Menus to Genesis
// Register and Hook Top Navigation Menu
add_action('genesis_before_header', 'sample_before_header_menu', 10);
function sample_before_header_menu() {
register_nav_menu( 'top', 'Top Navigation Menu' );
genesis_nav_menu( array(
'theme_location' => 'top',
'menu_class' => 'menu genesis-nav-menu menu-top',
) );
@nciske
nciske / plugin.php
Last active August 29, 2015 14:01
Fix for Genesis Simple Sidebars "Illegal string offset" error. Replace plugin.php with code below.
<?php
/*
Plugin Name: Genesis Simple Sidebars
Plugin URI: http://www.studiopress.com/plugins/simple-sidebars
Description: Genesis Simple Sidebars allows you to easily create and use new sidebar widget areas.
Author: Nathan Rice
Author URI: http://www.nathanrice.net/
Text Domain: ss
Domain Path: /languages/