Hi again, @unottico1965
I see you are more comfortable with plugins, so you can try:
Choose the one that is best suited for you!
Hope this helps!
Kind regards,
Vlad
hi Vlad, nice to see you again.
in realty i had try before you 1 plug-in for the category,
but it don’t worked, and also the other 2 you have wrote.
i think it’s a bug of WordPress, but when you rename
the plug-in “categorie” (italian language), i think that
wp exchange this for the original one, and you can see
only 13 categories.
but when the plug-in you rename “categories” or “wp-categories”,
the problema disappear.
thank again.
Happy you found a solution that works for you!
Thanks for sharing your findings!
hi Vlad, can i ask you:
if i want modify the original code of wp,
where it make only 13 categories visibles
on the main page, where is the part
of code that i must go ???
for write from 13 to infinite,
how is possible to do ???
thank very much.
One should never modify the core wp code, because those changes will be lost when the ext update will happen.
You should always use plugins or addional code to change the default behaviour.
ah ok, thank.
so, if i want use additional code for make category infinite,
is possible to have the code ???
thank.
i want try to have less plug-ins installed.
thank again.
Sure. Add this at the end of functions.php
file in your theme’s folder!
When you will update your theme this piece of code will be lost, so make sure you keep this code and insert it again if needed.
add_filter( 'widget_categories_args', function( $args ){ $args['number']= 20; $args['orderby']= 'count';$args['order'] = 'DESC'; return $args;} );
Modify 20 with your desired number.
Please pay attention when editing theme’s files, so nothing breaks. It’s best to make a backup first!
Hope this helps!
thank again.
i can save the code.
thank.
-
This reply was modified 4 years, 2 months ago by
unottico1965.
hi, the code don’t work.
is possible you have write it wrong ???
some spaces, for example ?
this one: widget_categories_args
you have take from the english theme
or you can change the code with
another name ???
That code should work regardless of what language you have your site in.
I am sorry it doesn’t work for you. I can’t think of another suggestion.
hi Vlad, this is the situation before your code:
[img]https://i.imgur.com/k44KoTH.jpg[/img]
and this is from the acp:
[img]https://i.imgur.com/5tQr095.jpg[/img]
when i install your code:
add_filter( ‘widget_categories_args’, function( $args ){ $args[‘number’]= 20; $args[‘orderby’]= ‘count’;$args[‘order’] = ‘DESC’; return $args;} );
this is what happen:
[img]https://i.imgur.com/MOJzy84.jpg[/img]
1) it is possible to reach 20 categories like inside your code ???
2) i see you have order by DESC, but if you look the last picture,
it is not in that order.
3) is possible your string is wrong ???
thank you very much.
hi Vlad, i have partially solved the problem of category in widget.
i have modify a little your code so:
add_filter( ‘widget_categories_args’, function( $args ){ $args[‘number’]= 20; $args[‘orderby’]= ‘name’;$args[‘order’] = ‘ASC’; return $args;} );
1) can be good to write “name” for categories or was “title” ???
2) the problem is always the number of the list in category widget.
they still stay only 14.
thank you again.