Rows missing after turning on sort feature

Rows missing after turning on sort feature

thinkingnotesthinkingnotes Posts: 2Questions: 1Answers: 0

Hi,

Please refer to this website

http://tncrm.synology.me/emservices/tenders/

After I turn on the sorting feature, some rows disappear. If the sorting feature is off, all rows will appear without any problem.

Can someone please advisde me where did it goes wrong?

<table id="tnTable1" class="tnTable footable" style="width:100%">
                <thead>
                    <tr>
                    <th style='width:10%;'>Advertisement Date</th>
                    <th style='width:10%;'>Closing Date</th>
                    <th style='width:30%;'>Client</th>
                    <th style='width:40%;'>Project Title</th>
                    <th style='width:10%;'>Eligibility & Financial Grades</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                        if ( $t_query->have_posts() ) {
                                // The Loop
                            while ( $t_query->have_posts() ) {
                                echo '<tr>';
                                $t_query->the_post();
                                echo '<td>' . get_field('advetisement_date') . '</td>';
                                echo '<td>' . get_field('closing_date') . '</td>';
                                echo '<td>' . get_field('clients') . '</td>';
                                echo '<td>' . '<a target="_blank" href="'. get_field('tender_attachment').'">' . get_the_title() .'</a>'. '</td>';
                                echo '<td>' . get_field('ef_grades') . '</td>';
                                echo '</tr>';
                            }
                            
                        }
                        
                        else {
                            echo "no posts found";
                        }

                        wp_reset_postdata();

                    ?>
                </tbody>
                </table>
jQuery(document).ready( function () {

                jQuery('#tnTable1').DataTable( {
                    "paging":   false,
                    "ordering": true,
                    "info":     false
                } );

                jQuery('#tnTable2').DataTable( {
                    "paging":   true,
                    "ordering": false,
                    "info":     false
                } );

        } );

Answers

This discussion has been closed.