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 | |
/* | |
Assumes a custom post type called 'staff' | |
Assumes that there is a custom taxonomy called 'department'. | |
Every department that has at least one staff member assigned to it will | |
populate a select field that is specified in Advanced Custom Fields. | |
Using that Select field we can then do a query on a custom post type | |
in this case staff and grab only the staff with our selected department. |
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 custom location rule type to column one for selecting an Event category | |
add_filter( 'acf/location/rule_types', 'mc_location_rule_types' ); | |
function mc_location_rule_types( $choices ) { | |
$choices['Events']['event_type'] = 'Event Type'; | |
return $choices; |
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 PARTS ABOVE THIS LINE *********/ | |
/* Remove Yoast SEO Columns | |
* Credit: Andrew Norcross http://andrewnorcross.com/ | |
* Last Tested: Jun 09 2020 using Yoast SEO 14.3 on WordPress 5.4.1 | |
* | |
* If you have custom post types, you can add additional lines in this format | |
* add_filter( 'manage_edit-{$post_type}_columns', 'yoast_seo_admin_remove_columns', 10, 1 ); | |
* replacing {$post_type} with the name of the custom post type. |
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 | |
* | |
* @package Custom_Featured_Post_Widget | |
* @author Gary Jones | |
* @license GPL-2.0+ | |
* @link http://gamajo.com/ | |
* @copyright 2013 Gary Jones, Gamajo Tech | |
*/ |
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
remove_action ( 'genesis_before_header', 'genesis_skip_links', 5 ); | |
add_action ( 'genesis_before_header', 'sk_skip_links', 5 ); | |
/** | |
* Add skiplinks for screen readers and keyboard navigation | |
* | |
* @since 2.2.0 | |
*/ | |
function sk_skip_links() { | |
if ( ! genesis_a11y( 'skip-links' ) ) { |
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
// 1. Go to https://twitter.com/i/likes | |
// 2. Keep scrolling to the bottom repeatedly until all your favs are loaded. | |
// 3. Run this in your console (open in chrome by View > Developer > JavaScript Console) | |
// Notes: this may take a while if you have a lot of favs/likes | |
// you can only access your most recent ~2000 likes. | |
// inspired by https://gist.github.com/JamieMason/7580315 | |
$('.ProfileTweet-actionButtonUndo').click() |
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_filter( 'genesis_noposts_text', 'my_custom_404_message', 10, 2 ); | |
function my_custom_404_message( $text ) { | |
$queried_object = get_queried_object(); | |
if ( isset( $queried_object->post_status ) && 'private' == $queried_object->post_status && !is_user_logged_in() ) | |
$text = sprintf( __( 'This page is restricted. Please <a href="%s">log in or register</a>.' ), wp_login_url( $_SERVER['REQUEST_URI'] ) ); | |
elseif ( is_search() ) |
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( 'wp', 'my_private_page_404' ); | |
function my_private_page_404() { | |
$queried_object = get_queried_object(); | |
if ( isset( $queried_object->post_status ) && 'private' == $queried_object->post_status && !is_user_logged_in() ) { | |
wp_safe_redirect( add_query_arg( 'private', '1', wp_login_url( $_SERVER['REQUEST_URI'] ) ) ); | |
exit; | |
} |
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
$white: #ffffff; | |
$black: #000000; | |
$red50: #ffebee; | |
$red100: #ffcdd2; | |
$red200: #ef9a9a; | |
$red300: #e57373; | |
$red400: #ef5350; | |
$red500: #f44336; | |
$red600: #e53935; | |
$red700: #d32f2f; |
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
.gallery .item { | |
// Small screen is set to 2 column grid | |
@include media($small-screen) { | |
@include span-columns(2); | |
@include omega(1n); | |
} | |
// Medium screen is set to a 4 column grid | |
@include media($medium-screen) { | |
@include span-columns(2); | |
@include omega(2n); |