• I have a table of softwares. I put it in html with the shortcode:

    [nextpage title="Some of the Software"]
    <table>
     <thead>
      <tr>
         <th>SOFTWARE</th>
         <th>USE</th>
      </tr>
     </thead>
     <tbody>
      <tr>
         <td>CONVERT</td>
         <td>Converting model setup parameters between systems, UNIX, SD2000, BC3, and DPW-Windows.</td>
      </tr>
     </tbody>
    </table>
    [/nextpage]

    and it works fine.

    Now I have moved the table into a database. I need to populate the post with php. I am using “Shortcode Exec PHP” plugin to insert php into the post. If I echo the shortcode, all I get is html text in the browser.

    I have tried to call the same shortcode:

    global $wpdb;
    $results = $wpdb->get_results(
      'SELECT software,description FROM wp_softwares', OBJECT );
    echo do_shortcode( '[nextpage title="About me"] I use lots of software.[/nextpage]' );
    $table = '
    <table>
     <thead>
      <tr>
         <th>SOFTWARE</th>
         <th>USE</th>
      </tr>
     </thead>
     <tbody>';
    foreach ( $results as $row)
    {
      $table .= '
      <tr>
         <td>'.$row->software.'</td>
         <td>'.$row->description.'</td>
      </tr>';
    }
    $table .= '
     </tbody>
    </table>';
    echo do_shortcode( '[nextpage title="Some of the Software"]' . $table . '[/nextpage]' );

    but all I get is
    <div style="display:none;">

    Help?

    https://www.ads-software.com/plugins/advanced-content-pagination/

  • The topic ‘do_shortcode’ is closed to new replies.