1
Когда я пытаюсь епдиеим пользовательским-css.php я получаю ошибку 500. Вот полный код:wp_register_style и внутренний сервер ошибка
function custom_style() {
wp_register_style('custom-style', get_template_directory_uri() . '/css/custom-style.php', array(), '20152111');
wp_enqueue_style('custom-style');
}
add_action('wp_enqueue_scripts', 'custom_style');
А вот заказ style.php файл:
<?php header('Content-type: text/css'); ?>
<style>
body.single-post{
background:url(<?php echo esc_url($custombck); ?>) no-repeat center top !important;
background-size: contain !important;
background-position-y: -30% !important;
}
</style>
Это было бы в случае с базовой таблицей стилей, но мне нужно включить php-код в css, поэтому у меня есть custom-style.php – user1756097
Хорошо, я не понял, что вы пытались сделать. Я получаю это сейчас. Я пересмотрел свой ответ. –