categories > products
-
Hey, so I need some advice on this php I’m trying to use on a products page. (I’m new to this)
I’ve written this so far…
<?php $productCats = get_categories(?'child_of' => 3?); //the ID of the parent category foreach($productCats as $productCat) { echo '<article class="item"> <a href="#"><img src="#" alt=" " /> <h2>' . $category->name . '</h2></a> <p>' . $category->description . '</p> </article>' ; } ?>
I have specific pages for each instance of $productCat to link to. How should I go about doing that?
I was thinking there might be a way to utilize the Order Page Attribute in some way?
Thanks in advance!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘categories > products’ is closed to new replies.