• Resolved Josh Rickert

    (@of-doom)


    Love the plugin! It’s just missing one thing… All I really need is a <span> and a class so I can style the numbers and make it look less like a sentence and more like a clock. Maybe some way to remove those commas (either with the options or with my own css). Kinda like this.

    There are plenty of “clock” style countdown plugins out there but this one seems the most robust in terms of letting me schedule events and have them change over as time goes on, so I’d like to stick with it.

    https://ww.wp.xz.cn/plugins/countdown-timer/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author fergbrain

    (@fergbrain)

    @josh Rickert: have you tried using the CSS classes listed in https://ww.wp.xz.cn/plugins/countdown-timer/installation/ ?

    Thread Starter Josh Rickert

    (@of-doom)

    Hey, thanks for the response. Yeah, I originally thought it was a problem with selector specificity, but later realized the plugin was outputting malformed HTML and that was causing my problems. So my browser was trying to nest one number inside the next, DOM-wise.

    I ended up forking the plugin and fixing it myself to solve my client’s issue. I think I added a few extra span tags so I could hide the commas, etc, but it’s been a while so I’ve forgotten. If you’d like to take a look at my changes, let me know and I’ll put my fork online for you.

    Plugin Author fergbrain

    (@fergbrain)

    I’d love to look at your changes if you’re willing to share.

    Thread Starter Josh Rickert

    (@of-doom)

    Not sure if there’s a better way to send these to you… Here’s a diff of my changes. I think the addslashes() was mangling the HTML.

    Here’s an example (scss) of how I ended up styling it after the changes. N

    Plugin Author fergbrain

    (@fergbrain)

    Would you be able to post the entire file as gist: https://gist.github.com/ ? That way I can easily branch it to the code (https://github.com/fergbrain/countdown-timer)

    Thread Starter Josh Rickert

    (@of-doom)

    I didn’t notice you had it on github. I’ll send a pull request.

    Plugin Author fergbrain

    (@fergbrain)

    Even better! Thank you very much!

    Thread Starter Josh Rickert

    (@of-doom)

    No problem. Pull request is submitted. I think it would knock out quite a few of your feature requests pertaining to styling flexibility (remove commas or spacer words, etc). It’s been awhile so I can’t quite remember, but I think it fixes your closing tag issue. I had the same debugging process and ended up realizing it was a problem with the HTML on the PHP side before it was ever handed off to your JS for display.

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

The topic ‘[Feature Request] Styling numbers’ is closed to new replies.