abdessamed
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Get title for TAG Shortcodethanks a lot Mr @sohanhossain
Finaly i found a solution for my problem
i made a global varible for $product_tag->name and i call it in loop-start.php file and it work’s perfectly, so now when i’m using the filter it show just the titles that has in the results.Forum: Plugins
In reply to: [WooCommerce] Get title for TAG ShortcodeSorry my English is bad,
so this is my shop page

the filter plugin support only default shop page or shortcodes, so I customize my archive page using products tags shortcode, but default shortcode do not show tag name so I made a loop to show tag name before products, but the problem here is when I filter products the tag title for empty results still appear.Forum: Plugins
In reply to: [WooCommerce] Get title for TAG Shortcode@sohanhossain is there any solution for this ??
- This reply was modified 5 years, 1 month ago by abdessamed.
Forum: Plugins
In reply to: [WooCommerce] Get title for TAG Shortcode[products tag=”product_tag” ]
i want that shortcode to include TAG NameForum: Plugins
In reply to: [WooCommerce] Get title for TAG Shortcode<?php $args = array( 'number' => $number, 'orderby' => 'title', 'order' => 'ASC', 'hide_empty' => $hide_empty, 'include' => $ids ); $product_tags = get_terms( 'product_tag', $args ); $count = count($product_tags); if ( $count > 0 ){ // echo do_shortcode( '[product_categories]' ); foreach ( $product_tags as $product_tag ) { if ($product_tag->count>0 ){ echo is_product_tag( $product_tag->name ); var_dump($tags_array); echo '<h3 class="tagname"> ' . $product_tag->name . '</a></h3>'; echo do_shortcode( '[products tag="'.$product_tag->slug.'"]' ); } } } ?>thats the code that i’m using, it’s work but when i use annasta filter plugin to filter products the title stil visible for tags that have not results.
Forum: Plugins
In reply to: [annasta Filters for WooCommerce] Plugin wont Filter custom shop pageThank you very much
it work with shortcode
this is the code that i’m using now<?php $args = array( 'number' => $number, 'orderby' => 'title', 'order' => 'ASC', 'hide_empty' => $hide_empty, 'include' => $ids ); $product_tags = get_terms( 'product_tag', $args ); $count = count($product_tags); if ( $count > 0 ){ foreach ( $product_tags as $product_tag ) { if ($product_tag->count>0){ echo '<h3 class="tagname">' . $product_tag->name . '</a></h4>'; echo do_shortcode( '[products tag="'.$product_tag->slug.'"]' ); } } } ?> <?php- This reply was modified 5 years, 4 months ago by abdessamed.