Support » Fixing WordPress » January Calendar WP 1.0

  • This is the last row in the table:

    <tr>
    <td>25</td><td>26</td><td>27</td><td>28</td><td>29</td><td>30</td><td>31</td>
    <td class='pad' colspan='7'> </td>
    </tr>

    The <td class='pad' colspan='7'> </td> should not be there. Anyone know how to fix this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I looked at Laughing Lizards test blog and it’s doing the same thing for January. The other months seem to be showing fine on both my site and his. Maybe this added td is supposed to be another row?

    I noticed this too…here is the fix…anyone know where to post bugs, and fixes to them…is there a section for that?
    Go to the function
    get_calendar()
    Found in the file: template-functions.php, find the lines below, its at the end of the function
    if (0 != $pad)
    echo “\n\t\t<td class=’pad’ colspan=’$pad’> </td>”;
    Change to this,
    if (0 != $pad and 7 != $pad)
    echo “\n\t\t<td class=’pad’ colspan=’$pad’> </td>”;

    Perfect!
    THANKS!

    I assume this may have been fixed, but the alternate solution is to add between the $pad calculation and the compare to zero:

    $pad = $pad % 7; // just in case date() returns 0.

    I hit this while overhauling the calendar code to support table-free calendars (see my other post coming up in the next hour or so!).
    =d

    fixed, committed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘January Calendar WP 1.0’ is closed to new replies.