This file contains hidden or 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
| /* | |
| Theme Name: Kadence Client | |
| Author: YOUR BUSINESS NAME HERE | |
| Author URI: https://your-website.com | |
| Description: A child theme for Kadence from YOUR BUSINESS NAME | |
| Version: 1.0.0 | |
| License: GNU General Public License v2 or later | |
| License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
| Text Domain: kadence-child | |
| Template: kadence |
This file contains hidden or 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 | |
| /* Debug Options */ | |
| define( 'WP_DEBUG_LOG', false ); | |
| define( 'WP_DEBUG', false ); | |
| /* MySQL Settings */ | |
| define( 'DB_NAME', 'database_name_here' ); | |
| define( 'DB_USER', 'username_here' ); |
This file contains hidden or 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
| // Stop User Enumeration Scans | |
| if (!is_admin()) { | |
| // default URL format | |
| if (preg_match('/author=([0-9]*)/i', $_SERVER['QUERY_STRING'])) die(); | |
| add_filter('redirect_canonical', 'ni_check_enum', 10, 2); | |
| } | |
| function ni_check_enum($redirect, $request) { | |
| // permalink URL format | |
| if (preg_match('/\?author=([0-9]*)(\/*)/i', $request)) die(); | |
| else return $redirect; |
This file contains hidden or 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
| //Add Page Slug to Body Class | |
| function ni_add_slug_body_class( $classes ) { | |
| global $post; | |
| if ( isset( $post ) ) { | |
| $classes[] = $post->post_type . '-' . $post->post_name; | |
| } | |
| return $classes; } | |
| add_filter( 'body_class', 'ni_add_slug_body_class' ); |
This file contains hidden or 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
| add_filter( 'image_editor_output_format', function( $formats ) { | |
| $formats['image/jpeg'] = 'image/webp'; | |
| return $formats; | |
| } ); |
This file contains hidden or 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
| add_filter( 'intermediate_image_sizes_advanced', 'ni_remove_default_image_sizes' ); | |
| // Source quadlayers.com/remove-wordpress-default-image-sizes/ | |
| function ni_remove_default_image_sizes( $sizes ) { | |
| unset($sizes['thumbnail']); // disable thumbnail size | |
| unset($sizes['medium']); // disable medium size | |
| unset($sizes['large']); // disable large size | |
| unset($sizes['medium_large']); // disable medium-large size | |
| unset($sizes['1536x1536']); // disable 2x medium-large size | |
| unset($sizes['2048x2048']); // disable 2x large size | |
| return $sizes; |
This file contains hidden or 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
| # BEGIN SMUSH-WEBP | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteCond %{DOCUMENT_ROOT}/./smush-webp/disable_smush_webp !-f | |
| RewriteCond %{HTTP_ACCEPT} image/webp | |
| RewriteCond %{REQUEST_FILENAME} -f | |
| RewriteCond %{DOCUMENT_ROOT}/./smush-webp/$1.$2.webp -f | |
| RewriteRule ^/?(.+)\.(jpe?g|png)$ /./smush-webp/$1.$2.webp [NC,T=image/webp,E=WEBP_image] | |
| </IfModule> |
This file contains hidden or 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
| These notes were provided from DougV for using the concepts from this webinar in Elementor and WPForms. Thanks Doug! | |
| ============= | |
| Add Plugin | |
| https://wordpress.org/plugins/dynamicconditions/ | |
| Dynamic Conditions by RTO GmbH | |
| How to Show/Hide Elementor Section Based on URL |