• Resolved kneep72

    (@kneep72)


    Installed TablePress, created a table and linked the table in a page [table id=1 /].
    Page ID is 9 (post=9). That’s OK.

    Our developer choose the Bones template and defined the page-home.php file as a total responsive overview page.

    In this page I would like to present the [table id=1 /].
    I tried the code:

    <?php
    $post_id = 9;
    $queried_post = get_post($post_id);
    $title = $queried_post->post_title;
    echo $queried_post->post_content;
    ?>

    But then only the shortcode [table id=1 /] is being displayed. Not the actual table.

    Could please inform me how to setup the code in order to call the actual Table in the page.php file?
    Direct call to the Table ID or a call to the Post ID would be perfect.

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This is not how a theme should present content. Shortcodes are run when you use the the_content(); function in a template tag. I recommend that your theme developer uses that in the code.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘Display Table (Table ID) in page-home.php’ is closed to new replies.