This topic has 5 replies, 2 voices, and was last updated 7 years, 10 months ago ago by Eva Kemp
Is there Some code I could use to change number of Product Tags in Footer (Static Block). Tried to use:
function woocommerce_tag_cloud_widget() {
$args = array(
‘number’ => 15,
‘taxonomy’ => ‘product_tag’
);
return $args;
}
add_filter( ‘woocommerce_product_tag_cloud_widget_args’, ‘woocommerce_tag_cloud_widget’ );
… but it didn’t work.
Any ideas/Quick Fixes?
Fond this as well, but not sure how to use it 🙂
—
function product_tag_cloud(){
product_tag_init();
$defaults = array(
‘smallest’ => 8, ‘largest’ => 22, ‘unit’ => ‘pt’, ‘number’ => 60,
‘format’ => ‘flat’, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’,
‘exclude’ => ”, ‘include’ => ”
—
I kind of tried all the options in Royal functions.php, but still didn’t get the results – and doesn’t this file be removed when I Update it? I use code:
<?php
function my_theme_enqueue_styles() {
$parent_style = ‘royal’;
wp_enqueue_style( $parent_style, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘maxx’,
get_stylesheet_directory_uri() . ‘/style.css’,
array( $parent_style ),
wp_get_theme()->get(‘Version’)
);
}
for Child Theme – should my CSS and functions.php and other files work with this theme? Not sure so I’ve put all my Changes in Custom CSS…
Hello,
Please try the solution described here https://www.wphub.com/how-to-customize-the-wordpress-tag-cloud/ .
Regards,
Eva Kemp.
Is this fo functions.php? I got an error:
Parse error: syntax error, unexpected end of file in /home/r28561/domains/wpeesti.ee/public_html/veebitestid/maxx/wp-content/themes/royal/functions.php on line 11 (the line code ends)
In Footer Static Block I use:
[vc_wp_tagcloud title=”” taxonomy=”product_tag” number=”10″] (should be straight from Visual Composer). I also couldn’t change number of Recent Posts there as well so I had to use [vc_widget_sidebar sidebar_id=”Posts”] (and Sidebar I made with 2 Posts). Is it possible, that Static Blocks have some issues with Visual Composer concerning “Number of” something?
Hello,
If you read the article attentively you’ll find that the code should be edited in the file wp-includes/category-template.php, it shouldn’t be added to functions.php, but open the file wp-includes/category-template.php, locate the code mentioned there and change number.
Regards,
Eva Kemp.
You must be logged in to reply to this topic.Log in/Sign up