return $imageUrl;
}
+function get_product_category_by_id($cat_id)
+{
+ $category = get_term_by('id', $cat_id, 'product_cat', 'OBJECT');
+ return $category;
+}
+
// // The code below is useful when you want the image to resize to
// if (has_post_thumbnail()) {
// $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
<?php if($memberPage):?>
<li><a href="<?php echo get_page_link($memberPage->ID);?>">Memberships</a></li>
<?php endif;?>
- <?php $donationsPage = get_post(199);?>
+ <?php $donationsPage = get_product_category_by_id(11);?>
<?php if($donationsPage):?>
- <li><a href="<?php echo get_page_link($donationsPage->ID);?>">Donate</a></li>
+ <li><a href="<?php bloginfo('url');?>/product-category/<?php echo $donationsPage->slug;?>"><?php echo $donationsPage->name;?></a></li>
<?php endif;?>
<?php $blog = get_post(203);?>
<?php if($blog):?>