L
L
ligisayan2016-01-16 11:22:33
Online shopping
ligisayan, 2016-01-16 11:22:33

How can I display a different display of pages depending on whether it is a directory or a subdirectory with a brand?

Hello! There is a site on wordpress + woocommerce. Tell me how you can display a different display of pages, depending on whether it is a directory or a subdirectory with a brand?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Kozlov, 2016-01-17
@ligisayan

need to change woocommerce template file. Which is located in the wp-content/plugins/woocommerce/templates/archive-product.php directory (may be a little different. This file is responsible for displaying the directory. ). In this file you get the current url ( php command $_SERVER['REQUEST_URI']). By parsing the url, we find out whether it is a directory or a subdirectory. And we wrap the entire output of the directory in a specific div with the class of the subdirectory or directory. Accordingly, we set the styles in css.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question