• Resolved dustinbrown

    (@dustinbrown)


    I’m trying to figure out how to add a table page using a blank page template. This is the template I’m using:

    <?php
    /*
    Template Name: blank page
    */
    ?>
    
    <?php get_header(); ?>
    
    <html>
    <body>
    
    </body>
    </html>
    
    <?php get_footer(); ?>

    If I use the Default Template, the table renders, but if I switch to my Blank Page template the table does not render. I have tried putting [table id=1 /] in the body section of my template PHP file, but that did not help.

    https://www.dustinbrown.com/studios/

    You can see that it currently looks like a blog post. I don’t want that.

    I also tried adding <div style="width:100%; text-align:center;">[table id=N /]</div> to the body section of my template file as suggested in the FAQ for centering a table on a page, but that did not work either.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    inside a page template, you will need to use the PHP template tag function, i.e.

    <?php
      wp_table_reloaded_print_table( "id=1" );
    ?>

    Then, to center a table on the page, try this CSS, which needs to be entered into the “Custom CSS” textarea on the “Plugin Options” screen:

    .wp-table-reloaded-id-1 {
      margin: 0px auto!important;
    }

    (Change the 1 in both examples to your table’s ID.)

    Best wishes,
    Tobias

    Thread Starter dustinbrown

    (@dustinbrown)

    Thank you, Tobias! I really appreciate your time and your help, that worked perfectly. High five, bud!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP-Table Reloaded] Add Table to Blank Page Template’ is closed to new replies.