WordPress.org

Ready to get started?Download WordPress

Forums

Top 10 - Popular posts plugin for WordPress
[Plugin: Top 10] Style the number on widget (5 posts)

  1. littleantz
    Member
    Posted 3 years ago #

    Hi, I want to style the number (post count) and the post title on the widget separately but I can't separate it.

    any idea how.

  2. Daedalon
    Member
    Posted 2 years ago #

    These require the plugin to set an HTML span element with a class attribute for those both. Then they can be styled in CSS. It's possible for the plugin author or someone else to make this adjustment for the code and also add a field for the user to directly insert the desired CSS attributes.

    https://wordpress.org/extend/plugins/wp-pagenavi-style/ is an excellent example of allowing easy styling for users. Possibly some of the code can be reused.

  3. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    I haven't provided a separate span tag because of it not being XHTML compliant.

    I'll check out the wp-pagenavi-style plugin to see what can be done

  4. Daedalon
    Member
    Posted 2 years ago #

    XHTML disallows having span inside li? Didn't find any mention of this on http://www.w3schools.com/tags/tag_li.asp or http://www.w3schools.com/tags/tag_span.asp. Then again http://www.w3schools.com/tags/tag_div.asp mentions nothign of the sort either, though I've seen some widget's changelogs mention "getting rid of the divs as they're not valid inside the widget area".

    Does anyone have a link explaining what's not valid XHTML in the widget area and why?

  5. Ajay
    Member
    Plugin Author

    Posted 2 years ago #

    I realised I already have span being implemented in the plugin, so it shouldn't be a problem adding in an additional span!

    I think it is a problem with XHTML Strict. It has been a while before I dusted those XHTML books!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags