Title: [FIX] use year shortcode attribute correctly
Last modified: August 21, 2016

---

# [FIX] use year shortcode attribute correctly

 *  [antonio-piha](https://wordpress.org/support/users/antonio-piha/)
 * (@antonio-piha)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/fix-use-year-shortcode-attribute-correctly/)
 * To fix use of shortcode “year” attribute:
 * 1) edit the “calendar.php” in plugin, then change the 10th line:
    $current_year
   = get_the_time( ‘Y’ ); to $current_year = $year;
 * 2) edit the “index.php” in line 129:
    from this: $args = array( ‘year’ => $this-
   >year ); to: $args = array( ‘year’ => $year );
 * 3) when this is applied you should be able to use the following:
    [availability
   calendar=”calendarId” year=”2014″] and the year 2014 will be displayed.
 * [http://wordpress.org/plugins/availability/](http://wordpress.org/plugins/availability/)

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

 *  [lokz](https://wordpress.org/support/users/lokz/)
 * (@lokz)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/fix-use-year-shortcode-attribute-correctly/#post-4368443)
 * Thank you for this fix. It works. I will ask developer to include it in plugin(
   if next version ever happens).
 *  anonymized-13603639
 * (@anonymized-13603639)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/fix-use-year-shortcode-attribute-correctly/#post-4368444)
 * I don’t understand why I have do edit the code because I use the syntax already,
   as you describe. Without modification.
    Is there a bug I never realized? Maybe?!
 * Can you explain why you edit the code? What happen if you don’t modify it?

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

The topic ‘[FIX] use year shortcode attribute correctly’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/availability_d7d8d9.svg)
 * [Availability Calendar](https://wordpress.org/plugins/availability/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/availability/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/availability/)
 * [Active Topics](https://wordpress.org/support/plugin/availability/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/availability/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/availability/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: anonymized-13603639
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/fix-use-year-shortcode-attribute-correctly/#post-4368444)
 * Status: not resolved