***********************************************************
//отключаем стили tablepress
add_action('wp_print_styles', 'mytheme_dequeue_css_from_plugins', 100);
function mytheme_dequeue_css_from_plugins($c) {
if (!is_admin()) {
wp_dequeue_style( "tablepress-default" );
}
}
*************************************************************
Шаблон для поста и произвольные поля
1) cоздаем со следующим кодом шаблон для поста
подключаем это для acf
https://github.com/joelstransky/Advanced-Custom-Fields-Post-Templates
***************************************************************
----------------svg--------------------------------------
function cc_mime_types($mimes) { $mimes['svg'] = 'image/svg+xml'; return $mimes; } add_filter('upload_mimes', 'cc_mime_types');
****************************************************************
*****************************************************************
//отключаем стили tablepress
add_action('wp_print_styles', 'mytheme_dequeue_css_from_plugins', 100);
function mytheme_dequeue_css_from_plugins($c) {
if (!is_admin()) {
wp_dequeue_style( "tablepress-default" );
}
}
*************************************************************
Шаблон для поста и произвольные поля
1) cоздаем со следующим кодом шаблон для поста
<?php/**/* * Template Name: Курсы новый шаблон * Template Post Type: post */ ?>2)
подключаем это для acf
https://github.com/joelstransky/Advanced-Custom-Fields-Post-Templates
***************************************************************
----------------svg--------------------------------------
function cc_mime_types($mimes) { $mimes['svg'] = 'image/svg+xml'; return $mimes; } add_filter('upload_mimes', 'cc_mime_types');
****************************************************************
function rr_404_my_event() {
global $post;
if(is_category(14)||is_category(9)||is_category(8)){
global $wp_query;
$wp_query->set_404();
status_header(404);
}}
add_action( 'wp', 'rr_404_my_event' );
*****************************************************************
Комментариев нет:
Отправить комментарий