This file contains hidden or 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 | |
| add_action( 'wp_enqueue_scripts', 'child_add_alternate_style_sheet' ); | |
| /** | |
| * Enqueue preferred and alternate style sheet. | |
| * | |
| * WordPress already adds a persistent style sheet (style.css), so this | |
| * function gives examples of adding a preferred and alternative style sheets. | |
| * | |
| * Persistent = browser MUST apply it. |
This file contains hidden or 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 | |
| add_action( 'wp_enqueue_scripts', 'prefix_add_ie8_style_sheet', 200 ); | |
| /** | |
| * Enqueue an IE-specific style sheet. | |
| * | |
| * Add a style sheet for everyone, then mark it as conditional to IE8 or below. | |
| * | |
| * @author Gary Jones | |
| * @link https://garyjones.io/enqueued-style-sheet-extras#ie |
This file contains hidden or 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 hidden or 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 | |
| /** | |
| * oEmbed Transparency | |
| * | |
| * Used so that menus can appear on top of videos | |
| * | |
| * @author Bill Erickson | |
| * @link http://www.billerickson.net/code/oembed-transparency | |
| * |
This file contains hidden or 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 | |
| // Remove all evidence of WP Engine from the Dashboard, unless the logged in user is "wpengine" | |
| $user = wp_get_current_user(); | |
| if ( $user->user_login != 'wpengine' ) { | |
| add_action( 'admin_init', 'jpry_remove_menu_pages' ); | |
| add_action( 'admin_bar_menu', 'jpry_remove_admin_bar_links', 999 ); | |
| } | |
| /** |
This file contains hidden or 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
| /** | |
| * Vertical centering with Flexbox + margin fallback | |
| * Lea Verou & David Storey | |
| */ | |
| html, body { height: 100%; } | |
| body { | |
| width: 100%; /* needed for FF */ | |
| margin: 0; |
This file contains hidden or 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
| remove_action( 'genesis_before_post_content', 'genesis_post_info' ); | |
| add_action( 'genesis_before_post_content', 'child_post_info' ); | |
| /** | |
| * Custom Post-Info with Google Rich Snippet support | |
| * | |
| * @author Greg Rickaby | |
| * @since 1.0.0 | |
| */ | |
| function child_post_info() { | |
| if ( is_page() ) |
This file contains hidden or 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 | |
| /** | |
| * Blog Archive | |
| * | |
| * @package BE_Genesis_Child | |
| * @since 1.0.0 | |
| * @link https://github.com/billerickson/BE-Genesis-Child | |
| * @author Bill Erickson <bill@billerickson.net> | |
| * @copyright Copyright (c) 2011, Bill Erickson | |
| * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
This file contains hidden or 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
| ## Run this in phpMyadmin | |
| ## | |
| ## Cleans up Posts table | |
| UPDATE wp_posts SET post_content = REPLACE(post_content, '“', '“'); | |
| UPDATE wp_posts SET post_content = REPLACE(post_content, 'â€', '”'); | |
| UPDATE wp_posts SET post_content = REPLACE(post_content, '’', '’'); | |
| UPDATE wp_posts SET post_content = REPLACE(post_content, '‘', '‘'); | |
| UPDATE wp_posts SET post_content = REPLACE(post_content, '—', '–'); | |
| UPDATE wp_posts SET post_content = REPLACE(post_content, '–', '—'); | |
| UPDATE wp_posts SET post_content = REPLACE(post_content, '•', '-'); |
This file contains hidden or 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 | |
| /* | |
| Plugin Name: Plugin Name | |
| Plugin URI: http://example.com/ | |
| Description: Description | |
| Version: 0.1 | |
| Author: Your Name | |
| Author URI: http://example.com/ | |
| */ |