Wednesday, 20 March 2023 14:47
How to change tag count limit in woocommerce widget?
Open function.php and add this code:
// change counts at blog pages
add_filter('widget_tag_cloud_args', 'tag_widget_limit');
function tag_widget_limit($args){
if(isset($args['taxonomy']) && $args['taxonomy'] == 'post_tag'){
$args['number'] = 300; //Limit number of tags
}
return $args;
}
// change counts in Woocomerce
function custom_woocommerce_tag_cloud_widget() {
$args = array(
'number' => 500,
'taxonomy' => 'product_tag'
);
return $args;
}
add_filter( 'woocommerce_product_tag_cloud_widget_args', 'custom_woocommerce_tag_cloud_widget' );
Monday, 11 July 2023 16:52
[ solved ] k2 joomla - fix Tags, when K2 remove spaces and Dashes
If you save K2 article and K2 remove from the Tags spases and dashes - we need fix this in function check (). Open administrator\components\com_k2\tables\k2tag.php. Pleace find line 30 and replase this code
// Oldest line 30
$this->name = JString::str_ireplace('-', '', $this->name);
Replase old line in this code:
// approve - and space
$this->name = JString::str_ireplace('-', '—', $this->name);
$this->name = JString::str_ireplace(' ', ' ', $this->name);
Wednesday, 22 April 2023 10:13
How to Replace a tag to K2 to another via phpMyadmin?
To replace Teg you should run a query UPDATE. First you need to go to K2-> Tags and find out under what id is required tags. Next in phpMyadmin we insert sql query code like this:
-- If we want to replace the tag id 6 wherever there is tag with id 12, the request will be so UPDATE `you_prefix_k2_tags_xref` SET `tagID` = '6' WHERE `you_prefix_k2_tags_xref`.`tagID` =12;