This file contains 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: Update Deprecated Genesis Options | |
* Description: Clears out deprecated Genesis RSS options from Genesis < v2.6. Uninstall after activation. | |
* Version: 1.0.0 | |
* Author: Chris Mower | |
* Author URI: https://thecookingdish.com | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
This file contains 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: Flywheel Flush Cache | |
Description: Flushes Local by Flywheel's cache, solving the problem of plugins showing multiple times. Drop this file in the mu-plugins folder | |
Version: 1.0.0 | |
Author: jtsternberg | |
Author URI: https://gist.github.com/jtsternberg/03219ce49c882f20d862724e0e594c73 | |
Text Domain: lbfw | |
Domain Path: /languages |
This file contains 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
/* INTRODUCTION | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
These instructions are for updating WordPress MultiSite to the new file paths. | |
It's written with a MultiSite that uses sub-directories, not sub-domains. But | |
with a few changes, you could easily use it for sub-domains. | |
If your WordPress MultiSite was installed prior to version 3.5, you're likely | |
using the old file path structure: blogs.dir. |
This file contains 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 | |
//* Do not copy the beginning <?php tag; place this code in your functions.php file | |
// Step 1: Modify the loop to accept an action hook | |
// Step 2: Create a widget area | |
// Step 3: Have the loop recognize the widget area | |
// Step 4: Place something in the new widget area to display | |
// Step 5: Style the area | |
/** |
This file contains 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 code is strictly for layout and does not do any sort of | |
* beautification or extra styling. Each theme is different, | |
* so you'll need to do that on your own. | |
* | |
* If you'd rather use css, you can use a free tool like | |
* SassMeister to compile this code. (https://www.sassmeister.com/) | |
*/ | |
// Easy Media Queries |
This file contains 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 is a way to quickly add placeholders for | |
* popular ad sizes on the web using an html div | |
*/ | |
// Define Ad Variables | |
$ad-background-color: #ccc; | |
$ad-text-color: #666; | |
$ad-base-font-size: 18px; | |
$ad-small-font-size: 12px; |
This file contains 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
// Replace 7 with the ID of your form and 13 with the ID of the field you want to force "all required" | |
// http://www.gravityhelp.com/documentation/page/Gform_field_validation | |
add_filter("gform_field_validation_7_13", 'validate_tcs', 10, 4); | |
function validate_tcs($result, $value, $form, $field) { | |
// Convert the checkbox input name value (returned as part of "field") | |
// into the "underscored" ID version which is found in the $_POST | |
foreach ($field['inputs'] as $input) { | |
$input_post_value = 'input_' . str_replace('.', '_', $input['id']); | |
This file contains 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( 'do_meta_boxes', 'tcd_remove_content_editor' ); | |
/** | |
* Remove content editor on some pages | |
* | |
* This is particularly useful for page templates and front pages. We hook into | |
* 'do_meta_boxes' because it manipulates already-registered meta boxes, firing | |
* after the 'add_meta_boxes' hook, but before the meta boxes are echoed. | |
* |
This file contains 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 | |
// Change header description for sub-sites to main site's description | |
add_filter( 'genesis_seo_description', 'tcd_change_header_description', 10, 3); | |
function tcd_change_header_description( $description, $inside, $wrap ) { | |
if ( is_main_site() ) { | |
$inside = esc_html( get_bloginfo( 'description' ) ); |
This file contains 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 | |
// Change header URL for sub-sites to main site's URL | |
add_filter( 'genesis_seo_title', 'tcd_change_header_url', 10, 3 ); | |
function tcd_change_header_url( $title, $inside, $wrap ) { | |
if ( is_main_site() ) { | |
$network_name = get_bloginfo( 'name' ); | |
$network_url = get_bloginfo( 'url' ); |
NewerOlder