WordPress
2
Вклад в тег
<?php
add_action( 'after_setup_theme', 'woocommerce_support' );
function woocommerce_support() {
add_theme_support( 'woocommerce' );
} ?>
<?php
/**
* Шаблон обычной страницы (page.php)
* @package WordPress
*/
get_header(); // подключаем header.php ?>
<section>
<div class="container">
<div class="row">
<?php get_sidebar(); // подключаем sidebar.php ?>
<div class="<?php content_class_by_sidebar(); // функция подставит класс в зависимости от того есть ли сайдбар, лежит в functions.php ?>">
<?php woocommerce_breadcrumb(); ?>
<?php woocommerce_content(); ?>
</div>
</div>
</div>
</section>
<?php get_footer(); // подключаем footer.php ?>
<?php echo do_shortcode("[Shortcode]"); ?>
<div class="jshop_list_category">
<?php if (count($this->categories)){ ?>
<div class = "jshop list_category">
<?php echo ('<h2 class="subtitle">Подзаголовок</h2>');?>
<?php foreach(JTable::getInstance("Category", "JShop")->getSubCategories(62, $ordering) as $k=>$category){?>
<?php if ($k%$this->count_category_to_row==0) echo '<div class="clear"></div><div class="str_category">'; ?>
<div class="jshop_categ width<?php echo round(100/$this->count_category_to_row, 0)?>">
<div class = "category">
<div class="image">
<a href = "<?php echo $category->category_link;?>"><img class="jshop_img" src="<?php echo $this->image_category_path;?>/<?php if ($category->category_image) echo $category->category_image; else echo $this->noimage;?>" alt="<?php echo htmlspecialchars($category->name)?>" title="<?php echo htmlspecialchars($category->name)?>" /></a>
</div>
<div>
<h2 class="category_title"><a class = "product_link" href = "<?php echo $category->category_link?>"><?php echo $category->name?></a></h2>
<p class = "category_short_description"><?php echo $category->short_description?></p>
</div>
</div>
</div>
<?php if ($k%$this->count_category_to_row==$this->count_category_to_row-1) echo '</div>'; ?>
<?php } ?>
<?php if ($k%$this->count_category_to_row!=$this->count_category_to_row-1) echo '</div>'; ?>
</div>
<?php }?>