Поддержка Проблемы и решения ошибка с элементом style

  • При валидации кода выдает ошибку: Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.)

    вот код:

    
      <style>↩
                        </style>↩
            <script>↩
                        </script>↩
            ↩
    		<style id="kt-theme-color">↩
            ↩
        body a,↩
        body .text-primary,↩
        .topbar-menu li>a:hover,↩
        .main-menu>li>a:hover,↩
        .main-menu .sub-menu>li>a:hover,↩
        .megamenu .widget_nav_menu ul>li>a:hover,↩
        .category-menu li>a:hover,↩
        .show-shopping-cart .list-product .product-name a:hover,↩
        .setting-option ul li a:hover,↩
        .header.style3 .main-menu>li>a:hover,↩
        .header.style3 .main-menu>li.active>a,↩
        .header.style5 .main-menu>li>a:hover,↩
        .header.style5 .main-menu>li.active>a,↩
        .header.style14 .main-menu>li>a:hover,↩
        .header.style14 .main-menu>li.active>a,↩
        .header.style15 .main-menu>li>a:hover,↩
        .header.style15 .main-menu>li.active>a,↩
        .header.sidebar .main-menu>li>a:hover,↩
        .header.sidebar .main-menu>li.active>a,↩
        .header-bottom-sidebar-menu .sub-menu>li>a:hover,↩
        .header.style9 .main-menu>li>a:hover,↩
        .header.style9 .main-menu>li.active>a,↩
        .product-item .product-name a:hover,↩
        .product-item.style2 .add_to_cart_button,↩
        .product-item.style2 .product_type_external,↩
        .product-item.style2 .product_type_simple,↩
        .product-item.style2 .product_type_grouped,↩
        .product-item.list .available span,↩
        .product-item.style5 .price,↩
        .product-item.style5 .yith-wcwl-add-to-wishlist>div a,↩
        .product-item.style5 .wishlist,↩
        .loadmore-link:hover,↩
        .breadcrumbs a:hover,↩
        .woocommerce-breadcrumb a:hover,↩
        .shop-top .show-grid-list a:hover,↩
        .shop-top .show-grid-list a.active,↩
        .widget_product_categories li a:hover,↩
        .widget_product_categories li.current-cat>a,↩
        .widget_layered_nav li a:hover,↩
        .widget_product_top_sale .p-name a:hover,↩
        .widget_recent_product .product-name a:hover,↩
        .element-icon.style2:hover,↩
        .element-icon.style2:hover .title,↩
        .element-icon.style3 .icon,↩
        .element-icon.style3 .subtite,↩
        .element-icon.style3:hover .title,↩
        .element-icon.plus:after,↩
        .footer .custom-menu  a:hover,↩
        .footer .our-service ul li a:hover,↩
        .footer .widget_social .social a:hover,↩
        .footer.style5 .widget_social .social a:hover,↩
        .footer .footer-menu li>a:hover,↩
        .lastest-blog .blog-title a:hover,↩
        .lastest-blog .meta .fa,↩
        .lastest-blog.style3 .blog-title a:hover,↩
        .banner-text.style3 .title,↩
        .banner-text.style3 .box-link:hover,↩
        .banner-text.style4 .subtitle,↩
        .block-category-carousel .list-cat li>a:hover,↩
        .block-single-product .product-name a:hover,↩
        .block-single-product .addtocart:hover,↩
        .product-details-right.style2 .share a:hover,↩
        table.group-product a:hover,↩
        .blog-item  .blog-title a:hover,↩
        .blog-item .readmore:hover,↩
        .blog-item  .more-link:hover,↩
        .blog-item .blog-comment .fa-comment,↩
        .product_list_widget a:hover .product-title,↩
        .widget_layered_nav_filters .chosen a:hover,↩
        .widget_categories li>a:hover,↩
        .widget_archive li>a:hover,↩
        .widget_pages li>a:hover,↩
        .widget_meta li>a:hover,↩
        .widget_nav_menu li>a:hover,↩
        .post-social a:hover,↩
        .product-item.style5 .yith-wcwl-add-to-wishlist>div a:hover,↩
        .product-item.style2 .added_to_cart,↩
        .element-icon.style3 .text,↩
        .element-icon.style4:hover,↩
        .element-icon.style4:hover,↩
        .mini-cart-content .product-name a:hover,↩
        .header.style19 .main-menu>li:hover>a,↩
        .header.style19 .main-menu>li.active>a,↩
        .footer.style2 .social a:hover,↩
        .footer.style3 .widget_nav_menu li a:hover,↩
        .footer.style3 .social a:hover,↩
        .button-loadmore:hover,↩
        .banner-masonry-item .title,↩
        .banner-masonry-item .link:hover,↩
        .footer.style7 .tagcloud a:hover,↩
        .footer.style7 .social a:hover,↩
        .block-newletter .desc .text-primary,↩
        .section-title.style9 h3,↩
        .footer .widget_nav_menu ul li a:hover,↩
        .block-single-product .single_add_to_cart_button:hover,↩
        .kt-tabs .tab-wapper.style3 .kt-tabs-list li a:hover,↩
        .kt-tabs .tab-wapper.style3 .kt-tabs-list li.vc_active a,↩
        .social-topbar a:hover,↩
        .header.style17 .main-menu>li:hover>a, ↩
        .header.style17 .main-menu>li.current-menu-item>a, ↩
        .header.style17 .main-menu>li.active>a,↩
        .header.style18 .main-menu>li.active>a,↩
        .header.style18 .main-menu>li:hover>a,↩
        .header.style20 .main-menu>li.active>a,↩
        .header.style20 .main-menu>li:hover>a,↩
        .product-item.style9 .yith-wcwl-add-to-wishlist>div a,↩
        .product-item.style9 .yith-wcwl-add-to-wishlist>div a:hover{↩
            color: #c6deea;↩
        }↩
    ↩
        .button:hover, input[type="submit"]:hover,↩
        .button.btn-primary,↩
        .owl-carousel.nav-style4 .owl-next:hover,↩
        .owl-carousel.nav-style4 .owl-prev:hover,↩
        .owl-carousel.nav-style6 .owl-next:hover,↩
        .owl-carousel.nav-style6 .owl-prev:hover,↩
        .owl-carousel.nav-style7 .owl-next:hover,↩
        .owl-carousel.nav-style7 .owl-prev:hover,↩
        .kt-tabs .kt-tabs-list .kt-tab a:after,↩
        .main-menu>li>a:before,↩
        .mini-cart .count,↩
        .mini-cart .group-button .check-out:hover,↩
        .header.sidebar .social a:hover,↩
        .product-item .yith-wcwl-add-to-wishlist>div a:hover,↩
        .product-item .compare-button a:hover,↩
        .product-item .button.yith-wcqv-button:hover,↩
        .product-item.style5 .add_to_cart_button:hover,↩
        .product-item.style5 .product_type_external:hover,↩
        .product-item.style5 .product_type_grouped:hover,↩
        .product-item.style5 .product_type_simple:hover,↩
        .product-item.list .yith-wcwl-add-to-wishlist>div a:hover,↩
        .product-item.style5 .compare:hover, ↩
        .product-item.style5 .yith-wcqv-button:hover,↩
        .tagcloud a:hover,↩
        .widget_price_filter .ui-slider-handle:last-child,↩
        .footer .widget_social .social a:hover,↩
        .section-title h3:before,↩
        .section-title.style4 h3:before,↩
        .section-title.style4 h3:after,↩
        .section-title.style6 .sub-title:after,↩
        .lastest-blog.style2 .blog-date,↩
        .banner-text .button,↩
        .block-category-carousel .title:after,↩
        .product-details-right .yith-wcwl-add-to-wishlist>div a:hover,↩
        .product-details-right.style2 .compare.button:hover,↩
        .sticky-post,↩
        .social a:hover,↩
        .blog-slidebar .widget .widget-title:after,↩
        body .shop-banner .owl-carousel .owl-next:hover, ↩
        body .shop-banner .owl-carousel .owl-prev:hover,↩
        .product-item .added_to_cart:hover,↩
        .product-item.style5 .added_to_cart:hover,↩
        .scroll_top:hover, ↩
        .scroll_top:focus, ↩
        .scroll_top:active,↩
        .newsletter.style3 form .newsletter-submit:hover,↩
        .newsletter.footer_newsletter form .newsletter-submit:hover,↩
        .section-title.style8:after,↩
        .kt-tabs .tab-wapper.style2 .kt-tabs-list li a:before,↩
        .kt-tabs .tab-wapper.style3 .title:before,↩
        .header.style20 .main-menu>li>a:before,↩
        .header.style20 .main-menu>li>a:after,↩
        .product-item.style9 .yith-wcwl-add-to-wishlist>div a:hover, ↩
        .product-item.style9 .compare:hover, ↩
        .product-item.style9 .yith-wcqv-button:hover,↩
        .product-item.style9 .button.yith-wcqv-button:hover,↩
        .product-item.style9 .add_to_cart_button:hover,↩
        .product-item.style9 .added_to_cart:hover{↩
            background-color: #c6deea;↩
        }↩
    ↩
        body blockquote,↩
        .owl-carousel.nav-style6 .owl-next:hover,↩
        .owl-carousel.nav-style6 .owl-prev:hover,↩
        .owl-carousel.nav-style7 .owl-next:hover,↩
        .owl-carousel.nav-style7 .owl-prev:hover,↩
        .category-menu li>a:hover,↩
        .category-menu.style2 li:hover .icon,↩
        .mini-cart .group-button .check-out:hover,↩
        .product-item .button.yith-wcqv-button:hover,↩
        .product-item.style5 .add_to_cart_button:hover,↩
        .product-item.style5 .product_type_external:hover,↩
        .product-item.style5 .product_type_grouped:hover,↩
        .product-item.style5 .product_type_simple:hover,↩
        .product-item.list .yith-wcwl-add-to-wishlist>div a:hover,↩
        .product-item.style5 .compare:hover, ↩
        .product-item.style5 .yith-wcqv-button:hover,↩
        body .element-icon.style2:before,↩
        body .element-icon.style2:after,↩
        .element-icon.style3 .icon,↩
        .footer .widget_social .social a:hover,↩
        .newsletter:after,↩
        .newsletter.style2,↩
        .product-details-right .yith-wcwl-add-to-wishlist>div a:hover,↩
        .product-details-right.style2 .compare.button:hover,↩
        body .shop-banner .owl-carousel .owl-next:hover, ↩
        body .shop-banner .owl-carousel .owl-prev:hover,↩
        .product-item.style5 .compare:hover, ↩
        .product-item.style5 .yith-wcqv-button:hover, ↩
        .product-item.style5.list .yith-wcwl-add-to-wishlist>div a:hover,↩
        .product-item.list.style5 .button.yith-wcqv-button:hover,↩
        .product-item.list.style5 .compare-button a:hover,↩
        .product-item.style5 .added_to_cart:hover,↩
        .category-menu li.menu-item-sc>div.widget_shopping_cart_content:hover,↩
        .footer.style2 .social a:hover,↩
        .footer.style3 .social a:hover,↩
        .footer.style7 .tagcloud a:hover,↩
        .footer.style7 .social a:hover{↩
            border-color: #c6deea;↩
        }↩
        			</style>↩
    

    Все это дело находится в body и я так понимаю выдает его какой-то плагин, как это можно исправить?

    • Тема изменена 3 года, 11 месяцев назад пользователем Yui.
    • Тема изменена 3 года, 11 месяцев назад пользователем Yui. Причина: please use CODE button for code formatting
Просмотр 2 ответов — с 1 по 2 (всего 2)
  • Модератор Yuri

    (@yube)

    Отталкивайтесь от <style id="kt-theme-color">. Вам виднее, кто такой KT.
    Но я бы не исключал и вредительство со стороны плагинов автооптимизации всего и вся, и даже кривизну Темы.

    а в чем кривизна то?
    в том, что style не в head секции?
    ну так это никогда не было настоящей ошибкой, всего лишь несоответствие строгим стандартам.

    так то, прописывание типа script, что делает wordpress независимо от того, html5 тема или нет — это тоже выдает ошибку валидации.

Просмотр 2 ответов — с 1 по 2 (всего 2)
  • Тема «ошибка с элементом style» закрыта для новых ответов.