null, 'labels' => array( 'name' => 'Услуги', // основное название для типа записи 'singular_name' => 'Услуга', // название для одной записи этого типа 'add_new' => 'Добавить услугу', // для добавления новой записи 'add_new_item' => 'Добавление услуги', // заголовка у вновь создаваемой записи в админ-панели. 'edit_item' => 'Редактирование услуги', // для редактирования типа записи 'new_item' => 'Новая услуга', // текст новой записи 'view_item' => 'Смотреть услугу', // для просмотра записи этого типа. 'search_items' => 'Искать услугу', // для поиска по этим типам записи 'not_found' => 'Не найдено', // если в результате поиска ничего не было найдено 'not_found_in_trash' => 'Не найдено в корзине', // если не было найдено в корзине 'parent_item_colon' => '', // для родителей (у древовидных типов) 'menu_name' => 'Услуги', // название меню ), 'description' => '', 'public' => true, // 'publicly_queryable' => null, // зависит от public // 'exclude_from_search' => null, // зависит от public // 'show_ui' => null, // зависит от public 'show_in_menu' => true, // показывать ли в меню адмнки // 'show_in_admin_bar' => null, // зависит от show_in_menu 'show_in_rest' => null, // добавить в REST API. C WP 4.7 'rest_base' => null, // $post_type. C WP 4.7 'menu_position' => null, 'menu_icon' => null, //'capability_type' => 'post', //'capabilities' => 'post', // массив дополнительных прав для этого типа записи //'map_meta_cap' => null, // Ставим true чтобы включить дефолтный обработчик специальных прав 'hierarchical' => true, 'supports' => ['title', 'editor', 'thumbnail','page-attributes'], // 'title','editor','author','thumbnail','excerpt','trackbacks','custom-fields','comments','revisions','page-attributes','post-formats' // 'taxonomies' => ['types'], 'has_archive' => true, 'rewrite' => true, 'query_var' => true, )); register_post_type('proizvodstvo', array( 'label' => null, 'labels' => array( 'name' => 'Производство', // основное название для типа записи 'singular_name' => 'Производство', // название для одной записи этого типа 'add_new' => 'Добавить Производство', // для добавления новой записи 'add_new_item' => 'Добавление Производства', // заголовка у вновь создаваемой записи в админ-панели. 'edit_item' => 'Редактирование Производства', // для редактирования типа записи 'new_item' => 'Новое Производство', // текст новой записи 'view_item' => 'Смотреть Производство', // для просмотра записи этого типа. 'search_items' => 'Искать Производство', // для поиска по этим типам записи 'not_found' => 'Не найдено', // если в результате поиска ничего не было найдено 'not_found_in_trash' => 'Не найдено в корзине', // если не было найдено в корзине 'parent_item_colon' => '', // для родителей (у древовидных типов) 'menu_name' => 'Производство', // название меню ), 'description' => '', 'public' => true, // 'publicly_queryable' => null, // зависит от public // 'exclude_from_search' => null, // зависит от public // 'show_ui' => null, // зависит от public 'show_in_menu' => true, // показывать ли в меню адмнки // 'show_in_admin_bar' => null, // зависит от show_in_menu 'show_in_rest' => null, // добавить в REST API. C WP 4.7 'rest_base' => null, // $post_type. C WP 4.7 'menu_position' => null, 'menu_icon' => null, //'capability_type' => 'post', //'capabilities' => 'post', // массив дополнительных прав для этого типа записи //'map_meta_cap' => null, // Ставим true чтобы включить дефолтный обработчик специальных прав 'hierarchical' => true, 'supports' => ['title', 'editor', 'thumbnail','page-attributes'], // 'title','editor','author','thumbnail','excerpt','trackbacks','custom-fields','comments','revisions','page-attributes','post-formats' // 'taxonomies' => ['types'], 'has_archive' => true, 'rewrite' => true, 'query_var' => true, )); register_post_type('cities', array( 'label' => null, 'labels' => array( 'name' => 'Города', // основное название для типа записи 'singular_name' => 'Город', // название для одной записи этого типа 'add_new' => 'Добавить Город', // для добавления новой записи 'add_new_item' => 'Добавление Города', // заголовка у вновь создаваемой записи в админ-панели. 'edit_item' => 'Редактирование Города', // для редактирования типа записи 'new_item' => 'Новый Город', // текст новой записи 'view_item' => 'Смотреть Город', // для просмотра записи этого типа. 'search_items' => 'Искать Город', // для поиска по этим типам записи 'not_found' => 'Не найдено', // если в результате поиска ничего не было найдено 'not_found_in_trash' => 'Не найдено в корзине', // если не было найдено в корзине 'parent_item_colon' => '', // для родителей (у древовидных типов) 'menu_name' => 'Города', // название меню ), 'description' => '', 'public' => true, 'publicly_queryable' => false, // зависит от public 'exclude_from_search' => false, // зависит от public // 'show_ui' => null, // зависит от public 'show_in_menu' => true, // показывать ли в меню адмнки // 'show_in_admin_bar' => null, // зависит от show_in_menu 'show_in_rest' => null, // добавить в REST API. C WP 4.7 'rest_base' => null, // $post_type. C WP 4.7 'menu_position' => null, 'menu_icon' => null, //'capability_type' => 'post', //'capabilities' => 'post', // массив дополнительных прав для этого типа записи //'map_meta_cap' => null, // Ставим true чтобы включить дефолтный обработчик специальных прав 'hierarchical' => false, 'supports' => ['title'], // 'title','editor','author','thumbnail','excerpt','trackbacks','custom-fields','comments','revisions','page-attributes','post-formats' // 'taxonomies' => ['types'], 'has_archive' => false, 'rewrite' => false, 'query_var' => false, )); } ?> 'Настройки сайта', 'menu_title' => 'Настройки сайта', 'menu_slug' => 'theme-general-settings', 'capability' => 'edit_posts', 'redirect' => false )); } if( 'disable_gutenberg' ){ add_filter( 'use_block_editor_for_post_type', '__return_false', 100 ); remove_action( 'wp_enqueue_scripts', 'wp_common_block_scripts_and_styles' ); add_action( 'admin_init', function(){ remove_action( 'admin_notices', [ 'WP_Privacy_Policy_Content', 'notice' ] ); add_action( 'edit_form_after_title', [ 'WP_Privacy_Policy_Content', 'notice' ] ); } ); } add_filter( 'body_class',function ( $classes ) { // добавим класс 'class-name' в массив классов $classes $classes[] = 'flex'; $classes[] = 'column'; return $classes; } ); add_filter('wp_title','clear_title', 10,3); function clear_title ($title, $sep, $seplocation) { $parts=explode($sep,$title); return array_pop($parts); } add_filter('post_thumbnail_id','set_default_img'); function set_default_img($thumbnail_id) { if(!$thumbnail_id) { $thumbnail_id=get_field('default_img','options'); } return $thumbnail_id; } add_filter('wp_get_attachment_image_src',function ($image){ $image[1]=''; $image[2]=''; return $image; }); add_theme_support( 'html5', array( 'script', 'style' ) ); ?> [ 'product_cat' ], 'hide_empty' => false, 'parent' => $parent_id, ]; if(is_shop()) { $args['exclude']=15; } $TERMS=get_terms($args); if($TERMS) { if ($new_template = locate_template(array('woocommerce/categories_page.php'))) { $template = $new_template; } } } } return $template; } add_filter( 'template_include', 'template_uslugi_proizvodstvo', 11); function template_uslugi_proizvodstvo ($template) { if(!is_admin()) { if ((is_post_type_archive('proizvodstvo') || is_post_type_archive('uslugi'))) { if ($new_template = locate_template(array('archive-uslugi-proizvodstvo.php'))) { $template = $new_template; } } if ((is_singular('proizvodstvo') || is_singular('uslugi'))) { if ($new_template = locate_template(array('single-uslugi-proizvodstvo.php'))) { $template = $new_template; } } } return $template; } function ajax_cart_rule() { add_rewrite_rule( 'ajaxcart', 'index.php?ajaxcart=yes', 'top' ); add_filter( 'query_vars', function( $vars ){ $vars[] = 'ajaxcart'; return $vars; } ); } add_action( 'init', 'ajax_cart_rule' ); function prefix_ajax_cart_rewrite_templates() { if ( get_query_var( 'ajaxcart' )=='yes') { global $wp_query; $wp_query->is_home = false; add_filter( 'template_include', function() { return get_template_part( 'includes/parts/ajax_cart' ); }); } } add_action( 'template_redirect', 'prefix_ajax_cart_rewrite_templates' ); ?> 1.0ООО ГК "Тантал"https://kazan.tantal-metall.comadminhttps://kazan.tantal-metall.com/author/admin/Провод обмоточный 0,90 3,55 мм2 медь ППИПК-2rich600338<blockquote class="wp-embedded-content" data-secret="vjPvforaCS"><a href="https://kazan.tantal-metall.com/product/provod-obmotochnyj-0-90-3-55-mm2-med-ppipk-2/">Провод обмоточный 0,90 3,55 мм2 медь ППИПК-2</a></blockquote><iframe sandbox="allow-scripts" security="restricted" src="https://kazan.tantal-metall.com/product/provod-obmotochnyj-0-90-3-55-mm2-med-ppipk-2/embed/#?secret=vjPvforaCS" width="600" height="338" title="«Провод обмоточный 0,90 3,55 мм2 медь ППИПК-2» — ООО ГК "Тантал"" data-secret="vjPvforaCS" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe><script type="text/javascript"> /*! This file is auto-generated */ !function(c,d){"use strict";var e=!1,o=!1;if(d.querySelector)if(c.addEventListener)e=!0;if(c.wp=c.wp||{},c.wp.receiveEmbedMessage);else if(c.wp.receiveEmbedMessage=function(e){var t=e.data;if(!t);else if(!(t.secret||t.message||t.value));else if(/[^a-zA-Z0-9]/.test(t.secret));else{for(var r,s,a,i=d.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=d.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=new RegExp("^https?:$","i"),l=0;l<n.length;l++)n[l].style.display="none";for(l=0;l<i.length;l++)if(r=i[l],e.source!==r.contentWindow);else{if(r.removeAttribute("style"),"height"===t.message){if(1e3<(s=parseInt(t.value,10)))s=1e3;else if(~~s<200)s=200;r.height=s}if("link"===t.message)if(s=d.createElement("a"),a=d.createElement("a"),s.href=r.getAttribute("src"),a.href=t.value,!o.test(a.protocol));else if(a.host===s.host)if(d.activeElement===r)c.top.location.href=t.value}}},e)c.addEventListener("message",c.wp.receiveEmbedMessage,!1),d.addEventListener("DOMContentLoaded",t,!1),c.addEventListener("load",t,!1);function t(){if(o);else{o=!0;for(var e,t,r,s=-1!==navigator.appVersion.indexOf("MSIE 10"),a=!!navigator.userAgent.match(/Trident.*rv:11\./),i=d.querySelectorAll("iframe.wp-embedded-content"),n=0;n<i.length;n++){if(!(r=(t=i[n]).getAttribute("data-secret")))r=Math.random().toString(36).substr(2,10),t.src+="#?secret="+r,t.setAttribute("data-secret",r);if(s||a)(e=t.cloneNode(!0)).removeAttribute("security"),t.parentNode.replaceChild(e,t);t.contentWindow.postMessage({message:"ready",secret:r},"*")}}}}(window,document); </script>