<?php
$args = array(
'taxonomy' => "product_cat",
'orderby' => 'name',
'order' => 'DESC',
);
$product_categories = get_terms($args);
foreach ( $product_categories as $cat )
{
//dd($cat,'fdf');
$term_id = $cat->term_id;
if ( $term_id != 19 )
{
$thumbnail_id = get_woocommerce_term_meta( $term_id, 'thumbnail_id', true );
$image = wp_get_attachment_url( $thumbnail_id ,'thumbnail');
$category_link = get_category_link( $term_id );
?>
<!--first-->
<div class="col-sm-3">
<div class="gd-collection-wrapper mb-5">
<figure class="gd-single-image">
<img src="<?php echo $image; ?>" />
</figure>
<div class="text-center">
<a href="<?php echo $category_link; ?>" class="gd-collection-pro-text"><?php echo $cat->name; ?></a>
</div>
</div>
</div>
<!--first-->
<?php }
}
?>
just add--- add_post_type_support( 'page', 'excerpt' ); ----to functions.php
Comments
Post a Comment