› Forums › CoolClock Pro › Changing hands color & size in shortcode
Tagged: color, hour hand, minute hand, shortcode, size
- This topic has 4 replies, 2 voices, and was last updated 2 years, 10 months ago by
RavanH.
- AuthorPosts
- 8 April 2022 at 18:52 #35552
Ken
ParticipantThe FSE versions of WordPress no longer support most traditional widgets, so it is impossible to change params in widget instances. So, we now must use only shortcodes to deploy clock instances. The standard black hands are not visible against most of my custom backgrounds.
Examples please of how to set the clock hands colors and size in shortcode params.
Attachments:
You must be logged in to view attached files. - 9 April 2022 at 19:31 #35574
RavanH
KeymasterHi Ken, indeed we are planning a block to replace the widget for the next release. In the meantime there is the shortcode. PLease know that the widget is basically the same as setting parameters on the shortcode, so all that you created with the widget is (in theory) also possole with the shortcode.
Have you read https://premium.status301.com/knowledge-base/coolclock/shortcode/ ?
Please tell me what you wish to accomplish exactly so I can give you more specific instructions 🙂
- 11 April 2022 at 01:01 #35595
RavanH
KeymasterHi Ken, it looks like you found a bug. The noseconds parameter is ignored unless you explicitly set it to 1 (or true) like
noseconds=1
. It will be fixed in the upcoming release, but in the meantime just add=1
to hide the second hand.To add a digital view to the clock, you can set the parameter
showdigital="digital24+"
but this cannot be done in combination withshowdigital="date"
.The
font
parameter applies only to the date/digital text and it must be in a very specific format to work. What are you trying to do? Make the text larger or in a different font face?To change the hour and minute hand colors, you’ll have to create a custom theme. The following example is a very basic one with blue hands:
[coolclock skin="custom" radius="60" showdigital="date" noseconds="1" align="center" background_image="http://fremontcountydems.org/staging/wp-content/uploads/1872-2022-CANONCITY-DEMOCRATS.png" background_stretch="contain"] { "hourHand": { "lineWidth":5, "startAt":-15, "endAt":50, "color":"#267EB9" }, "minuteHand": { "lineWidth":3, "startAt":-15, "endAt":65, "color":"#267EB9" } } [/coolclock]
This is the result:
- 11 April 2022 at 01:07 #35597
RavanH
KeymasterTo make the hands fatter, increase the
lineWidth
value. TheendAt
value sets the length of each hand…
- AuthorPosts
- You must be logged in to reply to this topic.