projects
/
WP-Plugins
/
michsci-products.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d67416a
)
set order for breadcrumbs by parent in hierachy
author
Anthony Talarico
<talarico@gaslightmedia.com>
Tue, 22 Dec 2015 18:35:26 +0000
(13:35 -0500)
committer
Anthony Talarico
<talarico@gaslightmedia.com>
Tue, 22 Dec 2015 18:35:26 +0000
(13:35 -0500)
views/product_detail.php
patch
|
blob
|
history
diff --git
a/views/product_detail.php
b/views/product_detail.php
index
b6718f2
..
adc5fa3
100644
(file)
--- a/
views/product_detail.php
+++ b/
views/product_detail.php
@@
-1,10
+1,12
@@
<?php
$args = array(
+ 'orderby' => 'parent',
'hierarchical'=> true,
-
+
);
-$array = wp_get_post_terms($product->ID, 'michsci_category', $args);
-$relatives = array_reverse($array);?>
+$relatives = wp_get_post_terms($product->ID, 'michsci_category', $args);
+//$relatives = array_reverse($array);
+print_r($relatives);?>
<?php foreach($relatives as $relative){
echo "<a href='#'>" . $relative->name . "</a>" . " > ";
} ?>