Changing hands color & size in shortcode

Forums CoolClock Pro Changing hands color & size in shortcode

Viewing 3 reply threads
  • Author
    Posts
    • #35552
      Ken Rucker
      Participant

      The 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.
    • #35574
      Rolf
      Keymaster

      Hi 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 🙂

    • #35595
      Rolf
      Keymaster

      Hi 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 with showdigital="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:


    • #35597
      Rolf
      Keymaster

      To make the hands fatter, increase the lineWidth value. The endAt value sets the length of each hand…

Viewing 3 reply threads
  • You must be logged in to reply to this topic.