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 | |
/* | |
* Custom filter to remove default image sizes from WordPress. | |
*/ | |
/* Add the following code in the theme's functions.php and disable any unset function as required */ | |
function remove_default_image_sizes( $sizes ) { | |
/* Default WordPress */ | |
unset( $sizes[ 'thumbnail' ]); // Remove Thumbnail (150 x 150 hard cropped) |
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_init', function () { | |
// Redirect any user trying to access comments page | |
global $pagenow; | |
if ($pagenow === 'edit-comments.php') { | |
wp_redirect(admin_url()); | |
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
<?php | |
//* Do NOT include the opening php tag | |
// Remove 'header' from structural wrap | |
add_theme_support( 'genesis-structural-wraps', array( | |
'nav', | |
'subnav', | |
'site-inner', | |
'footer-widgets', | |
'footer' |
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 content_save_pre_func($content){ | |
global $allowedposttags; | |
$allowedposttags['iframe'] = array( | |
'class' => array () , | |
'src'= > array() , | |
'width' => array(), | |
'height' => array() , | |
'frameborder' => 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
//* Display Posts Shortcode - Exclude Categories | |
add_filter( 'display_posts_shortcode_args', 'be_display_posts_shortcode_exclude_categories', 10, 2 ); | |
function be_display_posts_shortcode_exclude_categories( $args, $atts ) { | |
if( isset( $atts['cat_not_in'] ) ) { | |
$categories = explode( ',', $atts['cat_not_in'] ); | |
$args['category__not_in'] = $categories; | |
} |
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
.gform_wrapper ul { | |
padding-left: 0; | |
list-style: none; } | |
.gform_wrapper li { | |
margin-bottom: 15px; } | |
.gform_wrapper form { | |
margin-bottom: 0; } |