• rogbiz

    (@rogbiz)


    I manage a weather website and I’d like to show on the page such data as the historical average max and min temperature for the current month. So as not to clutter with 12 months of data, I need to have a block display for example December’s historical max and min only when it is December.

    I can find plugins to display a block during a date range, but then it’s year specific, I’d need to reset it to display again next year. I can’t find one to set to display simply if current month is December.

    Anyone know if there is such a plugin, or indeed if I can achieve what I’m looking for by CSS?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The “Block Visibility” plugin supports date as one of the conditions to show/hide a block. But it’s a date range. That means your monthly settings will include the year: https://www.ads-software.com/plugins/block-visibility/

    Another plugin that claims to have this feature is the “Content Visibility” plugin. But it seems the feature is only available in the PRO (ie paid) version, so I couldn’t test it out: https://www.ads-software.com/plugins/conditional-blocks/

    … or indeed if I can achieve what I’m looking for by CSS?

    No, CSS cannot do this sort of thing.

    Thread Starter rogbiz

    (@rogbiz)

    Thanks George, I had looked at both of these but I think they both are limited to a date range, ie including year.

    I’ll keep looking!

    Roger

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display block depending on month’ is closed to new replies.