Перенос описания главной страницы WooCommerce
-
Уважаемые форумчане, возникла проблема с отображением описания главной страницы магазина (которую мы привязываем как осн. стр. магазина). Если с категориями все понятно — легко решить, то тут проблема так просто не решается.
Порывшись в коде, нашел файл и код отвечающий за отображение описания. Как его перенести под товары: сайт zovdom.ru (страница каталог кухонь)<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' ); /** * WooCommerce Theme Support * * @link http://www.woothemes.com/woocommerce/ */ add_action( 'after_setup_theme', 'us_woocommerce_support' ); function us_woocommerce_support() { add_theme_support( 'woocommerce' ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } if ( ! class_exists( 'woocommerce' ) ) { return FALSE; } global $woocommerce; if ( version_compare( $woocommerce->version, '2.1', '<' ) ) { define( 'WOOCOMMERCE_USE_CSS', FALSE ); } else { add_filter( 'woocommerce_enqueue_styles', 'us_woocommerce_dequeue_styles' ); function us_woocommerce_dequeue_styles( $styles ) { $styles = array(); return $styles; } add_action( 'wp_enqueue_scripts', 'us_woocomerce_dequeue_checkout_styles', 100 ); function us_woocomerce_dequeue_checkout_styles() { wp_dequeue_style( 'select2' ); wp_deregister_style( 'select2' ); } } if ( ! ( defined( 'US_DEV' ) AND US_DEV ) AND us_get_option( 'optimize_assets', 0 ) == 0 ) { add_action( 'wp_enqueue_scripts', 'us_woocommerce_enqueue_styles', 14 ); } function us_woocommerce_enqueue_styles( $styles ) { global $us_template_directory_uri; $min_ext = ( ! ( defined( 'US_DEV' ) AND US_DEV ) ) ? '.min' : ''; wp_enqueue_style( 'us-woocommerce', $us_template_directory_uri . '/css/plugins/woocommerce' . $min_ext . '.css', array(), US_THEMEVERSION, 'all' ); } // Adjust markup for all woocommerce pages remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); if ( ! function_exists( 'us_woocommerce_before_main_content' ) ) { add_action( 'woocommerce_before_main_content', 'us_woocommerce_before_main_content', 10 ); function us_woocommerce_before_main_content() { echo '<div class="l-main"><div class="l-main-h i-cf"><main class="l-content">'; if ( is_post_type_archive( 'product' ) && 0 === absint( get_query_var( 'paged' ) ) ) { $shop_page = get_post( wc_get_page_id( 'shop' ) ); if ( $shop_page ) { $description = apply_filters( 'the_content', $shop_page->post_content ); if ( $description ) { $has_own_sections = ( strpos( $description, ' class="l-section' ) !== FALSE ); if ( ! $has_own_sections ) { $description = '<section class="l-section for_shop_description"><div class="l-section-h i-cf">' . $description . '</div></section>'; } echo $description; } } } echo '<section id="shop" class="l-section for_shop"><div class="l-section-h i-cf">'; } } remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); if ( ! functio[PHP][PHP]
Страница, с которой нужна помощь: [войдите, чтобы увидеть ссылку]
- Тема «Перенос описания главной страницы WooCommerce» закрыта для новых ответов.