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
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ https://%1/$1 [R=301,L] | |
RewriteCond %{HTTPS} on | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ https://%1/$1 [R=301,L] |
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
/* Hide actionbar | NL-12062516-hc */ | |
div#actionbar, | |
.site-info { | |
display: none; | |
} |
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
wp media regenerate --yes |
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
wp media regenerate --image_size=course_archive_thumbnail --yes | |
wp media regenerate --image_size=course_single_thumbnail --yes | |
wp media regenerate --image_size=lesson_archive_thumbnail --yes | |
wp media regenerate --image_size=lesson_single_thumbnail --yes | |
wp media regenerate --image_size=portfolio_horizontal --yes | |
wp media regenerate --image_size=portfolio_slider --yes | |
wp media regenerate --image_size=portfolio_vertical --yes | |
wp media regenerate --image_size=shop_catalog --yes | |
wp media regenerate --image_size=shop_thumbnail --yes | |
wp media regenerate --image_size=woocommerce_gallery_thumbnail --yes |
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 | |
// Overwrite default image sizes. | |
add_action('init', 'smntcs_remove_image_sizes'); | |
function smntcs_remove_image_sizes() { | |
add_image_size( 'course_archive_thumbnail', 0 ); | |
add_image_size( 'course_single_thumbnail', 0 ); | |
add_image_size( 'lesson_archive_thumbnail', 0 ); | |
add_image_size( 'lesson_single_thumbnail', 0 ); | |
add_image_size( 'portfolio_horizontal', 0 ); | |
add_image_size( 'portfolio_slider', 0 ); |
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 | |
if ( ctype_alnum( $input ) ) { | |
echo $input . ' only contains letters and numbers.'; | |
} else { | |
echo $input . ' does not only contains letters and numbers.'; | |
} |
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 | |
if ( ctype_digit( $input ) ) { | |
echo $input . ' only contains numbers.' ); | |
} else { | |
echo $input . ' does not only contains numbers.' ); | |
} |
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 | |
if ( ctype_alpha( $input ) ) { | |
echo $input . ' only contains letters.'; | |
} else { | |
echo $input . ' does not only contains letters.'; | |
} |
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 | |
$post_type = 'products'; | |
$taxonomy = 'products-category'; | |
// Fetch root categories | |
$root_cat_args = array( | |
'taxonomy' => $taxonomy, | |
'hide_empty' => false, | |
'parent' => 0, |
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
add_action( 'wp_head', 'add_signature' ); | |
function add_signature() { | |
?> | |
<!-- | |
_____ _ _ _ | |
| __ \ | | | | | | | |
| |__) _ __ __ _ _ __ ___ __ _| |_| |__ ___ ___| |__ | |
| ___| '__/ _` | '_ ` _ \ / _` | __| '_ \ / _ / __| '_ \ | |
| | | | | (_| | | | | | | (_| | |_| | | | __\__ | | | | |