WordPress.org

Ready to get started?Download WordPress

Forums

January Calendar WP 1.0 (6 posts)

  1. Nick Momrik
    Member
    Posted 10 years ago #

    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?

  2. Nick Momrik
    Member
    Posted 10 years ago #

    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?

  3. mrwok
    Member
    Posted 10 years ago #

    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>";

  4. Nick Momrik
    Member
    Posted 10 years ago #

    Perfect!
    THANKS!

  5. davidchait
    Member
    Posted 10 years ago #

    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

  6. Alex King
    Member
    Posted 10 years ago #

    fixed, committed.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.