PenciDesign Supporter replied
Hi,
Thank you for let me know about this.
Have a good day.
Regards,
PenciDesign.
I have already solved it and I have seen what the problem was. I have started using soledad theme with the wordpress version 5.8. This version of wordpress uses gutenberg blocks instead of the old widgets. That is why the filter was not working, since I was using a block. To solve I have returned to the old widgets with the following filter:
add_filter( 'use_widgets_block_editor', '__return_false' );
Then I have selected the old tag widget, and I have gone back to the new version with Gutenberg blocks, but now I have the inherited widget that I have selected from the old widgets and on which the filter works. I don't know if gutenberg blocks have their own filters, but at least the tag filter doesn't work with the block.
Thank you very much for your quick responses, a good support is as important as a good product.
I think you can replicate it in your web staging environment. It is only to use the following code:
<code>
add_filter( 'widget_tag_cloud_args', 'wp_tag_cloudweb' );
function wp_tag_cloudweb() {
$args = array(
'smallest' => 13,
'largest' => 13,
'unit' => 'px',
'number' => 10,
'format' => 'flat',
'separator' => " — ",
'orderby' => 'count',
'order' => 'DESC',
'show_count' => 1,
'echo' => false
);
return $args;
}
</code>
The code as you see is correct, but it does not work when I add the tag cloud widget in any sidebar space. I've tried adding the code as a plugin, it doesn't work either, I've tried to change the priority and it doesn't work either. Has the filter in the theme been modified?
Yes, I know. I did it from code snippets and the code does not work from there.
I tried the code in another theme and it works, but in soledad theme it doesn't work
I just deleted that line, but it doesn't work. >span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="es" data-phrase-index="2">Besides in the hook I have to be ordered from most popular to least, etc, show count. I put it in to see if it worked, but none of that changes. I don't think it's a css problem.
In console I do not see any error.
I have used the following code:
add_filter( 'widget_tag_cloud_args', 'wp_tag_cloudweb' );
function wp_tag_cloudweb() {
$args = array(
'smallest' => 13, 'largest' => 13,
'unit' => 'px', 'number' => 10,
'format' => 'flat',
'separator' => " — ",
'orderby' => 'count', 'order' => 'DESC',
'show_count' => 1,
'echo' => false
);
return $args;
}
But nothing changes in tag cloud widget, I have tried another theme and the hook works. I put it in Header Signup form widget space.
Want to join this conversation or access attachments? Sign in first.
Open your ticket archive, review validated licenses, and continue product support conversations from one customer portal.