• Hi, I’m wanting to edit the styling of the ‘Recent Posts’ widget.
    I have used a ‘Blank Theme’.

    I’m wanting to use this styling:

    ul#articles{list-style-type:none;width:100%; background:none; border:none;}
    ul#articles li{margin: 0; border-bottom:1px solid #d1d1d1;   padding:2px 0;}
    ul#articles li a{margin: 0; text-decoration:none;}

    Can you please advise 🙂

    Ta! Kelvin.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Try using Firefox with the Firebug add-on for this kind of CSS work.
    http://getfirebug.com/

    Thread Starter keljnr

    (@keljnr)

    This is a brill tool cheers.
    The Recent Posts Widget uses the default ul; where can I edit this so I can give it the ‘articles’ ID?

    So:
    <ul id="articles">

    Cheers 🙂

    You can’t edit the widget itself as it’s part of core but your theme should be applying a unique class or id to its container.

    Thread Starter keljnr

    (@keljnr)

    Thanks, I managed to solve this by changing the default-widgets.php in wp-includes folder. Cheers again Esmi!

    No! Never, ever, edit WordPress core scripts. And do not encourage others to do so. Editing core scripts can bring down your entire site and/or open security holes for hackers to use.

    Thread Starter keljnr

    (@keljnr)

    Understood Esmi! Thanks for the advice 🙂

    but you can edit a copy of the core scripts and put the on the child theme folder, right?

    No – you extend the native widgets via the theme – if necessary.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Styling 'Recent Posts' Widget’ is closed to new replies.