• Resolved dinesh786

    (@dinesh786)


    echo "<table id='compounds_table'>";
    echo "<tr><td>Name</td><td>Sur-name</td></tr>";
    
    $row = 0;
    while ($row < 50)
    {
    
    $user= 'First';
    $compound_name= 'Last';
    
    echo "<tr><td>".$user."</td><td>".$compound_name."</td></tr>";
    $row++;
    }
    echo "</table>";
    
    echo do_shortcode('[wp_jdt id="compounds_table"]');

    Just tried this demo code in my custom page file page-data.php
    what should I do please help
    It generate table but not shows pagination, no sorting, no other else functionality.

    https://ww.wp.xz.cn/plugins/wp-jquery-datatable/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author AppJetty

    (@biztechc)

    Hello Dinesh,

    Plz follow bellow structure.

    <?php echo do_shortcode(‘[wp_jdt id=”compounds_table”]’); ?>
    <table id=’compounds_table’ width=’100%’>
    <thead>
    <tr>
    <th>Name</th>
    <th>Position</th> <th>Office</th>
    <th>Age</th> <th>Start date</th>
    <th>Salary</th>
    </tr>
    </thead>
    <tfoot>
    <tr>
    <th>Name</th>
    <th>Position</th>
    <th>Office</th>
    <th>Age</th>
    <th>Start date</th>
    <th>Salary</th>
    </tr>
    </tfoot>
    <tbody>
    <tr>
    <td>Tiger Nixon</td>
    <td>System Architect</td>
    <td>Edinburgh</td>
    <td>61</td
    <td>2011/04/25</td>
    <td>$320,800</td>
    </tr>
    </tbody>
    </table>

    Same problem here, got the table but no funcionality at all. Here is the code:

    echo do_shortcode('[wp_jdt id="tab_abog"]'); ?>
    <table id='tab_abog' width='100%'>						<thead><tr><th>NOMBRES</th>
       <th>FECHA DE TITULACION</th>
       <th>FECHA DE CONVALIDACION</th></tr></thead>
    <tfoot><tr><th>NOMBRES</th>
       <th>FECHA DE TITULACION</th>
       <th>FECHA DE CONVALIDACION</th></tr></tfoot>
    <tbody> <?php foreach($nombres as $nombre) { ?>
       <tr><td><?php echo $nombre->NOMBRES; ?></td>
           <td><?php echo $nombre->FECHA_DE_TITULACION; ?></td>
           <td><?php echo $nombre->FECHA_DE_CONVALIDACION; ?></td></tr>
    	<?php	} ?></tbody></table>

    Solved! I just updated the “WP jQuery DataTable Settings” on back end

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

The topic ‘Not able to generate table’ is closed to new replies.