I want to assign a new CSS class to default widget <ul>
in Page/Post creating page in WordPress. How can I do this?
See the image below.
I want to assign a new CSS class to default widget <ul>
in Page/Post creating page in WordPress. How can I do this?
See the image below.
Comments are closed.
Don’t edit your parent theme’s
functions.php
file.Copy it over to your child theme’s
functions.php
and make the changes there, or simply register a new widget.You could then hook it in from your child theme’s
functions.php
like this:You can also add more classes to the dynamic_sidebar function.
Go to your
function.php
and find your widget codeYou must add or edit that
class
parameters in your sidebar code like that'class' => 'new-class',
It would be like that:
You must check out WordPress Codex for more usage
you had written wrong question. its not on widget but on post/page description.
AS per codex you needs to add extra styles to css file. you can add class via code but this is better solution. see this codex link for details
Styling Lists