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
/** | |
* Register hero block | |
*/ | |
add_action('acf/init', 'hero'); | |
function hero() { | |
// check function exists | |
if( function_exists('acf_register_block') ) { | |
// register a hero block |
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
/////////////////////////////////////////////// | |
////// GRAVITY FORMS RESET STYLES ////// | |
/////////////////////////////////////////////// | |
// These styles are made in mind to be used with SCSS or LESS | |
// If you use these styles, you must go to the Gravity Forms settings in the WordPress back end and set Output CSS to No. | |
////----- Core Containers | |
.gform_heading, | |
.gform_body, |
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: Norcross Debug Functions | |
Plugin URI: https://gist.github.com/norcross/7864205/ | |
Description: A set of functions I use on all sites while building | |
Author: Andrew Norcross | |
Version: 0.0.1 | |
Requires at least: 3.0 | |
Author URI: http://andrewnorcross.com | |
*/ |
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 | |
/** | |
* == About this Gist == | |
* | |
* Code to add to wp-config.php to enhance information available for debugging. | |
* | |
* You would typically add this code below the database, language and salt settings | |
* | |
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists). | |
* |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
*/ | |
$args = array( |
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 ( 'admin_menu', 'rkv_filter_admin_published_default' ); | |
function rkv_filter_admin_published_default() { | |
// call global submenu item | |
global $submenu; | |
// edit main link for posts | |
$submenu['edit.php'][5][2] = 'edit.php?post_status=publish'; |
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 | |
function rkv_remove_columns( $columns ) { | |
// remove the Yoast SEO columns | |
unset( $columns['wpseo-score'] ); | |
unset( $columns['wpseo-title'] ); | |
unset( $columns['wpseo-metadesc'] ); | |
unset( $columns['wpseo-focuskw'] ); |
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 | |
$args = array( | |
// Normal query goes here // | |
'no_found_rows' => true, // counts posts, remove if pagination required | |
'update_post_term_cache' => false, // grabs terms, remove if terms required (category, tag...) | |
'update_post_meta_cache' => false, // grabs post meta, remove if post meta required | |
); |
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
/** | |
* A simple menu with a :hover action | |
*/ | |
html { | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; | |
font: 100%/2.5 helvetica, arial; | |
} |