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.
By default, all the text field on Customizer doesn't support execute PHP code. Please install the Code Snippet plugin, the create a new snippet with your custom PHP 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?
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:
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 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.
Hi,
Please send me your site URL.
Regards,
PenciDesign.
In console I do not see any error.
Hi,
Please go to Appearance → Theme Editor:
- Select theme to edit: Soledad,
- Select file main.css, find:
Delete this line on the code above:Regards,
PenciDesign.
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.
Hi,
By default, all the text field on Customizer doesn't support execute PHP code. Please install the Code Snippet plugin, the create a new snippet with your custom PHP code.
Regards,
PenciDesign.
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
Hi,
Please send me your site login credential in a PRIVATE reply. I'll log in and help you check your code.
Regards,
PenciDesign.
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?
Hi,
The code working properly on my site. Please try to check again.
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.
Hi,
Thank you for let me know about this.
Have a good day.
Regards,
PenciDesign.