Когда я вставляю код в файл function.php, мой веб-сайт перестает работать, и появляется сообщение «Сайт испытывает технические трудности»
/**
* Adding Shortcode 'box'
*/
function boxShow($atts, $content = null ){
//default values
$option = shortcode_atts( array(
'type' => '',
), $atts );
ob_start();
$class = $option[ 'type' ] ? str_replace( '"', '', $option[ 'type' ] ) : 'normal';
//HTML goes here
?>
<div class="box <?php echo $class; ?>"><?php echo $content; ?></div>
<?php
$output = ob_get_clean();
return $output;
}
add_shortcode( 'box', 'boxShow' );
и код CSS
.shadow , .success , .info{
padding: 12px 12px;
background-color: #fafafa;
border: 1px solid black;
margin-bottom:8px;