Skip to content

Instantly share code, notes, and snippets.

View ScottTravisHartley's full-sized avatar
🏠
Working from home

Scott Hartley ScottTravisHartley

🏠
Working from home
View GitHub Profile
@ScottTravisHartley
ScottTravisHartley / wordpress-username-ban-list
Created February 18, 2020 01:48
WordPress Username Ban List
about
access
account
accounts
add
address
adm
admin
administrator
administration
@ScottTravisHartley
ScottTravisHartley / disable-wp-admin-bar
Created July 2, 2019 20:48
Disable WordPress Admin Bar
add_filter('show_admin_bar', '__return_false');
@ScottTravisHartley
ScottTravisHartley / sert-social-warfare-optimizer
Created June 26, 2019 21:39
Load Social Warfare CSS / JS Only On Posts
function sertmedia_remove_social_warfare_junk() {
if (! is_singular('post') ) {
wp_dequeue_style('social-warfare-block-css');
wp_dequeue_style('social_warfare');
wp_dequeue_script('social_warfare_script');
add_filter( 'swp_header_html', '__return_false', PHP_INT_MAX );
}
}
add_action( 'wp_enqueue_scripts', 'sertmedia_remove_social_warfare_junk' );
@ScottTravisHartley
ScottTravisHartley / social-warfare-remove-inline-css
Created June 26, 2019 21:38
Remove Social Warfare Inline CSS
add_filter( 'swp_header_html', '__return_false', PHP_INT_MAX );
@ScottTravisHartley
ScottTravisHartley / booked-organizer
Created June 26, 2019 03:44
Booked Plugin Organizer
function sertmedia_remove_booked_junk() {
if ( is_page( 'blog' ) ) {
wp_dequeue_script('booked-functions');
wp_dequeue_script('booked-spin-jquery');
wp_dequeue_script('booked-spin-js');
wp_dequeue_script('booked-tooltipster');
wp_dequeue_style('booked-animations');
wp_dequeue_style('booked-icons');
wp_dequeue_style('booked-responsive');
@ScottTravisHartley
ScottTravisHartley / booked-optimizer
Created June 26, 2019 03:40
Booked Plugin Optimizer
function sertmedia_remove_booked_junk() {
if ( ! is_page( 'appointment' ) ) {
wp_dequeue_script('booked-functions');
wp_dequeue_script('booked-spin-jquery');
wp_dequeue_script('booked-spin-js');
wp_dequeue_script('booked-tooltipster');
wp_dequeue_style('booked-animations');
wp_dequeue_style('booked-icons');
wp_dequeue_style('booked-responsive');
@ScottTravisHartley
ScottTravisHartley / array-genesis-title-tag
Last active June 23, 2019 17:43
Enable Genesis Title Toggle For Multiple Post types
function sertmedia_title_toggle_all_post_types( $post_types ) {
$post_types = get_post_types(
array(
'public' => true,
'_builtin' => false,
),
'names'
);
$post_types[] = 'post';
$post_types[] = 'portfolio';
@ScottTravisHartley
ScottTravisHartley / genesis-title-tag-enable-post-type
Created June 23, 2019 17:37
Enable Genesis Title Toggle For Posts
function sertmedia_title_toggle_on_posts( $post_types ) {
$post_types[] = 'post';
return $post_types;
}
add_filter( 'be_title_toggle_post_types', 'sertmedia_title_toggle_on_posts' );
/*Genesis Change Read More Text*/
function sertmedia_read_more_link() {
return '... <a class="more-link" href="' . get_permalink() . '">Continue Reading <i class="fa fa-arrow-right"></i></a>';
}
add_filter( 'get_the_content_more_link', 'sertmedia_read_more_link' );