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
// setlocale(LC_TIME, 'de_DE', 'deu_deu'); | |
<?php the_time('l, j. F Y') ?> |
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
function google_fonts() { | |
?> | |
<!-- [1] --> | |
<link rel="preconnect" | |
href="https://fonts.gstatic.com" | |
crossorigin /> | |
<!-- [2] --> | |
<link rel="preload" | |
as="style" |
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
/* big tablets only */ | |
@media only screen | |
and (min-width: 1024px) | |
and (max-height: 1366px) | |
and (-webkit-min-device-pixel-ratio: 1.5) { | |
} | |
/* tablet landscape */ |
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
/*Deleting content when an ACF field is deleted is easy, relatively. Please note that the use of this function cannot be undone and it will erase all traces of content for any ACF field that is deleted. | |
Please be sure that this is something that you want to do before implementing this and I would strongly suggest that this is only enabled during development and not on a live site. Should a client go into ACF for some reason and delete a field, there is nothing that you’d be able to do to recover form it. */ | |
// this action is run by ACF whenever a field is deleted | |
// and is called for every field in a field group when a field group is deleted | |
add_action('acf/delete_field', 'delete_acf_content_on_delete_field'); | |
function delete_acf_content_on_delete_field($field) { | |
// runs when acf deletes a field |
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
// Rename default post formats | |
add_filter( | |
'load_script_translations', | |
function( $translations, $file, $handle, $domain ) { | |
/** | |
* The post format labels used for the dropdown are defined in the | |
* "wp-editor" script. | |
*/ | |
if ( 'wp-editor' === $handle ) { | |
/** |
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_action('nav_menu_css_class', 'add_current_nav_class', 10, 2 ); | |
function add_current_nav_class($classes, $item) { | |
// Getting the current post | |
global $post; | |
$current_post_type = get_post_type($post->ID); // post, c45_project | |
$item_page_id = get_post_meta( $item->ID, '_menu_item_object_id', true ); |
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
/** | |
* @snippet Hide Products From Specific Category @ Shop | |
* @how-to Get CustomizeWoo.com FREE | |
* @author Rodolfo Melogli | |
* @compatible WooCommerce 3.6.3 | |
* @donate $9 https://businessbloomer.com/bloomer-armada/ | |
*/ | |
add_action( 'woocommerce_product_query', 'bbloomer_hide_products_category_shop' ); | |
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
// format bytes in KB/MB | |
function formatBytes($bytes, $precision = 0) { | |
$units = array('B', 'KB', 'MB', 'GB', 'TB'); | |
$bytes = max($bytes, 0); | |
$pow = floor(($bytes ? log($bytes) : 0) / log(1024)); | |
$pow = min($pow, count($units) - 1); | |
// Uncomment one of the following alternatives | |
// $bytes /= pow(1024, $pow); |
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
16:9 | 56.25% | |
4:3 | 75% | |
3:2 | 66.66% | |
8:5 | 62.5% |