@ 2018-09-29T11:53:07Z <?php
/*
Template Name: Shop Categories Page
*/
?>
<?php get_header(); ?>
<!-- Page Title -->
<section id="home" class="xl-py t-center white fullwidth">
<!-- Background image - you can choose parallax ratio and offset -->
<div class="bg-parallax" data-stellar-ratio="0.76" data-stellar-vertical-offset="0" data-background="<?php echo get_theme_file_uri('/assets/images/backgrounds/background_1.jpg'); ?>"></div>
<!-- Container -->
<div class="container relative">
<div class="white skrollr" data-0="opacity:1; transform:translateY(0px);" data-700="opacity:0; transform:translateY(220px);">
<!-- <h5 class="gray4">выбор по категориям</h5> -->
<h1 class="firasans">Все категории</h1>
</div>
</div>
<!-- End Container -->
</section>
<!-- End Page Title -->
<?php
$args = array(
'taxonomy' => 'product_category',
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => true,
);
$the_query = new WP_Term_Query($args);
?>
<section class="clearfix">
<div class="tab-container sm-my">
<div class="container col-3 gap-10 boxes-type-4 mini-mt white">
<?php foreach($the_query->get_terms() as $category) : ?>
<?php
$category_url = get_term_link($category->term_id, $category->taxonomy);
$image = get_field('image', $category->taxonomy.'_'.$category->term_id);
$image = $image['sizes']['product_category'];
?>
<!-- Box -->
<div class="box">
<a href="<?php echo $category_url; ?>" class="radius cover" data-background="<?php echo $image ?>">
<div class="texts">
<h3 class="bold-title"><?php echo $category->name; ?></h3>
</div>
</a>
</div>
<?php endforeach; ?>
</div>
</div>
</section>
<?php get_footer(); ?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.33 , 8.2.0 - 8.2.29 , 8.3.0 - 8.3.25 , 8.4.1 - 8.4.12
Fatal error: Uncaught Error: Call to undefined function get_header() in /in/XONEE:6
Stack trace:
#0 {main}
thrown in /in/XONEE on line 6
Process exited with code 255 . Output for 5.6.0 - 5.6.40
Fatal error: Call to undefined function get_header() in /in/XONEE on line 6
Process exited with code 255 . preferences:dark mode live preview ace vim emacs key bindings
149.6 ms | 407 KiB | 5 Q