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 namespace_login_style(){ | |
if( function_exists('get_custom_header')){ | |
$width = get_custom_header()->width; | |
$height = get_custom_header()->height; | |
} else { | |
$width = HEADER_IMAGE_WIDTH; | |
$height = HEADER_IMAGE_HEIGHT;} | |
echo ''.PHP_EOL;} | |
?> |
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 | |
// Place the given PHP code in between <?php and ?> inside your theme’s functions.php file. If there is no ending ?> , it is recommended to place the code at the end part of the file. After you finished placing the code, save and update the functions.php file. You will see that all featured images are gone. Now you can remove the above PHP code from functions.php as it is just a one-time job. Please note that you will not be able to set featured images until you remove the mentioned code. (This code will keep removing them.) | |
global $wpdb; $wpdb->query( " DELETE FROM $wpdb->postmeta WHERE meta_key = '_thumbnail_id' " );?> |
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 | |
// you can change 20 on line #8 to any date between 1 to 27 | |
add_shortcode( 'seomonth' , 'gtrmd_seomonthyear' ); | |
function gtrmd_seomonthyear() { | |
$gtseomonthyear1 = date_i18n("F"); | |
$gtseomonthyear2 = date("F", strtotime ( '+1 month' , strtotime ( $gtseomonthyear1 ) )) ; | |
$gtdtseocheck = date("j"); | |
if($gtdtseocheck > 20){ | |
return "$gtseomonthyear2"; | |
} else{ |
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('init', function() { | |
register_block_style('core/pullquote', [ | |
'name' => 'smaller', | |
'label' => __('Small', 'md'), | |
'inline_style' => '.wp-block-pullquote.is-style-smaller blockquote{font-size:18px!important}' | |
]); | |
register_block_style('core/quote', [ | |
'name' => 'minimal', | |
'label' => __('Minimal', 'md'), | |
'inline_style' => '.wp-block-quote.is-style-minimal{font-size: 18px; padding: 2em; border-left:8px solid #c0392b; box-shadow: 1px 2px 9px 0px rgb(153 153 153 / 33%); line-height:1.9em}' |
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( | |
'enqueue_block_editor_assets', | |
function () { | |
$theme = wp_get_theme(); | |
wp_enqueue_style( | |
'block-md-custom-css', '/wp-content/themes/md-child/custom-editor.css?v=1' | |
); | |
} | |
); |
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 MD Image Sizes to Gutenberg Image Block */ | |
add_filter( 'image_size_names_choose','md_custom_image_sizes' ); | |
function md_custom_image_sizes( $sizes ) { | |
return array_merge( $sizes, array( | |
//Add your custom sizes here | |
'md-full' => __( 'MD Full' ), | |
'md-banner' => __( 'MD Banner' ), | |
'md-block' => __( 'MD Block' ), | |
'md-thumbnail' => __( 'MD Thumb' ), |
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
@media (prefers-color-scheme: dark) { | |
.aawp .aawp-tb__row--highlight { | |
background-color: #219b00; | |
color: #fff; | |
} | |
.aawp .aawp-tb__row--highlight a, h4.pt-cv-title a { | |
color: #fff; | |
} | |
.logopatch3,.logopatch4,.logopatch5{ |