Answer the question
In order to leave comments, you need to log in
Why is page.php used to display categories instead of taxonomy-product_cat.php?
Good afternoon.
On my site, page.php is used instead of the taxonomy-product_cat.php template.
I can't understand why?
Here is the content of page.php.
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site may use a
* different template.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package benefis
*/
get_header();
?>
<script>
jQuery(document).ready(function () {
$('.woocommerce').removeClass();
});
</script>
<div class="slider">
<div class="slider_video_parent">
<span></span>
<video src="http://benefis.myihor.ru//images/video/10000000_690038651457564_3112166903667890767_n.mp4" class="videoslider" autoplay="" loop="" muted="" width="1280" height="720"></video>
</div>
</div>
<div class="container">
<div class="row">
<?php get_sidebar(); ?>
<?php while (have_posts()) :
the_post();
get_template_part('template-parts/content', 'page');
endwhile; // End of the loop.
?>
</div>
</div>
<?php get_footer();
Answer the question
In order to leave comments, you need to log in
Found the answer.
The fact is that I did not start developing this site from scratch. Before me, a miracle developer installed woocommerce and set it up, but somehow in its own way.
After reading this article https://delaemsait.info/integriruem-woocommerce-s-...
I learned that you need to include woocommerce in functions.php.
add_action('after_setup_theme', 'woocommerce_support');
function woocommerce_support()
{
add_theme_support('woocommerce');
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question